2108 solutions found
Page 5 of 106votes
Given an associative array: array("key1" => "value1", "key2" => "value2", ...) How would I go about remo...
votes
How do I check if a URL exists (not 404) in PHP?
votes
I have some code that appears to merge the data from two arrays using `+=`, but it doesn't include all of the elements in the element. How does it work?...
votes
When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run `./configu...
votes
I'm trying to use dynamic variable names. So inside this loop I want to create `$file0`, `$file1`, and `$file2`: for($i=0; $i<=2; $i++) {...
votes
I've got this very simple thing that just outputs some stuff in CSV format, but it's got to be UTF-8. I open this file in TextEdit or TextMate or Dreamw...
votes
I am writing a SQL query creator using some parameters. In Java, it's very easy to detect the last element of an array from inside the for loop by just chec...
votes
I have an input form on my website where HTML is allowed and I'm trying to add instructions about the use of HTML tags. I'd like the text to <...
votes
I want to increase *maximum execution time* in php , not by changing `php.ini` file. I want to Increase it from my php file. Is this possible?
votes
Consider: $xml = "l"; $xml = "vv"; echo $xml; This will echo `vv`. Why and how can I do multi-line string literals for...
votes
How can I remove the first 4 characters of a string using PHP?
votes
We have two PHP5 objects and would like to merge the content of one into the second. There are no notion of subclasses between them so the solutions described i...
votes
PHP - Is there a quick, on-the-fly method to test for a single character string, then prepend a leading zero? Example: $year = 11; $month = 4;...
votes
I'm essentially preparing phrases to be put into the database, they may be malformed so I want to store a short hash of them instead (I will be simply compa...
votes
I'm working on a [CMS][1] that fetches a user's profile image from their Facebook [URL][2] (that is, http://facebook.com/users_unique_url). How can I ac...
votes
I'm starting with the new Google service for the notifications, `Firebase Cloud Messaging`. Thanks to this code https://github.com/firebase/quickstart-a...
votes
PHP 5.5 has been released and it features a new code caching module called OPCache, but there doesn't appear to be any documentation for it. So where is...
votes
Here is my code, ``` $url = 'url_to_post'; $data = array( "first_name" => "First name", "last_name" =>...
votes
I'm getting `$row['message']` from a MySQL database and I need to remove all whitespace like `\n` `\t` and so on. $row['message'] = &...
votes
It's got to be somewhere in the phpinfo() dump, but I just don't know where. Is it supposed to be under the "Additional Modules" section? So...