2108 solutions found
Page 22 of 106votes
I'm struggling to understand the difference between `shell_exec()` and `exec()`... I've always used `exec()` to execute server side commands, when wo...
votes
It often happens to me to handle data that can be either an array or a null variable and to feed some `foreach` with these data. $values = get_values();...
votes
I am trying to send an email via GMail's SMTP server from a PHP page, but I get this error: > authentication failure [SMTP: SMTP server does no suppor...
votes
What is the easiest way to encode a PHP string for output to a JavaScript variable? I have a PHP string which includes quotes and newlines. I need the conte...
votes
I want to extract the digits from a string that contains numbers and letters like: "In My Cart : 11 items" I want to extract the number `11`...
votes
I have recently installed Laravel 5 via Composer. I tried creating a new controller using Artisan and got the following error. Am I missing something? >bo...
votes
How do you debug **PHP** scripts? I am aware of basic debugging such as using the Error Reporting. The breakpoint debugging in **PHPEclipse** is also quite u...
votes
I've been trying to study up on PHP lately, and I find myself getting hung up on traits. I understand the concept of horizontal code reuse and not wanting t...
votes
I need to convert seconds to "Hour:Minute:Second". For example: "685" converted to "00:11:25" How can I achieve this?
votes
I saw this today in some PHP code: $items = $items ?: $this->_handle->result('next', $this->_result, $this); I'm not familiar wit...
votes
I've had a look over [here][1] but didn't find any details on the best file permissions. I also took a look at some of WordPress's form's quest...
votes
In JavaScript, you can easiliy create an object without a class by: myObj = {}; myObj.abc = "aaaa"; For PHP I've found this one,...
votes
How can I remove three characters at the end of a string in PHP? "abcabcabc" would become "abcabc"!
votes
When trying to create a new laravel project, The following error appears on the CLI: > Could not open input file: artisan > > Script php artisan clea...
votes
How to append one array to another without comparing their keys? $a = array( 'a', 'b' ); $b = array( 'c', 'd' ); At...
votes
> **Possible Duplicate:** > [PHP detecting request type (GET, POST, PUT or DELETE)](https://stackoverflow.com/questions/359047/php-detecting-request-typ...
votes
I see there are [a few][1]. Which ones are maintained and easy to use? What are their pros and cons? [1]: http://codeigniter.com/wiki/Category:Libraries...
votes
How do I get timestamp from e.g. `22-09-2008`?
votes
I got this error when I requested to update the [PHP][1] version from 5.2.17 to PHP 5.3.21 on the server. <div style="border:1px solid #990000;paddi...
votes
I'd like to check if two arrays are equal. I mean: same size, same index, same values. How can I do that? Using `!==` as suggested by a user, I expect th...