366 solutions found in php-dev
Page 18 of 19votes
I'm on Ubuntu 14.04 and I've been trying all possible methods to install Laravel to no avail. Error messages everything I try. I'm now trying the fi...
votes
I have a [Gradle][1] project in Ubuntu. It's written in Java 14. I have the Java 14 JDK installed. When I build it from the command line, everything work...
votes
is there any simple way to create new array with extra value ? $table->data = array( array('Harry Potter', '76%', 'Gettin...
votes
I have the below PHP script <?php header('Content-Type: text/html; charset=utf-8'); $file = "//192.168.10.206/wwwroot/SABI...
votes
### What is this? This is a collection of questions that come up now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to p...
votes
Is there an easy way to delete an element from an array using PHP, such that `foreach ($array)` no longer includes that element? I thought that setting it to...
votes
Consider: $a = 'How are you?'; if ($a contains 'are') echo 'true'; Suppose I have the code above, what is the...
votes
How can one parse HTML/XML and extract information from it?
votes
Let me prefix this by saying that I know what `foreach` is, does and how to use it. This question concerns how it works under the bonnet, and I don't want a...
votes
I have checked my PHP ini file (`php.ini`) and `display_errors` is set and also error reporting is `E_ALL`. I have restarted my Apache webserver. I have even...
votes
How can I write two functions that would take a string and return if it starts with the specified character/string or ends with it? For example: $str...
votes
How can I sort this array by the value of the "order" key? Even though the values are currently sequential, they will not always be. Array...
votes
I have an array: `array( 4 => 'apple', 7 => 'orange', 13 => 'plum' )` I would like to get the first element of this arr...
votes
Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is `bcrypt`? PHP doesn't offer any such...
votes
I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give p...
votes
Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML t...
votes
It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection. This...
votes
I have a PHP array like so: $messages = [312, 401, 1599, 3, ...]; Given that **the values in the array are unique**, how can I delete the element with...
votes
I need to keep a session alive for 30 minutes and then destroy it.
votes
Please define what `stdClass` is.