I am getting sometimes this error on production at: I have tried to reproduce this issue. But not getting any progress. $Id, $Properties having value received. Does anyone know when does ‘Cannot break/continue 1 level’ comes in PHP? I have seen this post PHP Fatal error: Cannot break/continue. But…
Tag: php
Are there more advantages to returning an empty string or null value?
If I were writing the below method (for example) is it considered good practice to either: A: return an empty string if the document didn’t exist? B: return a null value? Having done a lot of Java, and methods in Java requiring a return type, I’m under the impression it is best practice to return …
How to use ‘interval’ in Doctrine2 Query Builder
In my Symfony2 repository, I’d like to get objects from a schedule table, that have started, but not finished yet. The interval, within the objects should be encountered as ‘not finished’, should be passed as a variable. Using plain SQL, it works like this: Can I achieve the same with DQL / …
How can I change opencart order email content as our wish? Is it possible?
Can I change the content of order email, which file it exactly refers? This is a confirmation of an online transaction placed with ######. The AuthOnly transaction totaled $171.90 and will be …
phpize Install xcache in mac os x 10.7.3,no such file directory
When I run phpsize,get the following error: I have installed xcode 4.3.2 Answer You need autoconf utility to complete the installation. You can install Homebrew and then do brew install autoconf in Terminal. After that repeat XCache installation. I prefer Homebrew because it’s easy to use and it puts al…
PHP $_SESSION for multiple users at once
I’m wondering about how the $_SESSION array works. If I have a lot of users using my site do I need to set a subarray for each user? For instance right now I have $_SESSION[‘userid’] = $userid; $…
How should I got about setting up a local LAMP stack with switchable PHP and MySQL on OS X?
I’m moving house in a few weeks and am taking the opportunity to update my tech setup, switching from a MacBook Pro and a MacBook Air to a MacBook Air (which will be my day-to-day computer) and a Mac Mini Server (which will be a media hub and be used for heavy lifting). As part of this process, I’…
Javascript getTime to php date
I have javascript that turns dates in my view to a time string using getTime(). That then is stored as a value for an option in my select form. Once it is passed to php, how do I turn that into a php date? I have done: Answer You use PHP’s date() function: Updated, thanks Yoshi.
Using PHP/MYSQL book but get no output from PHP when trying to access the database
I’m currently working my way through “PHP and MySQL Web Development.” I’ve successfully created databases and been able to make tables and use the database. I’ve also successfully completed all the …
How to output (to a log) a multi-level array in a format that is human-readable?
I’m working on a drupal site and when debugging, I am always having to read through long, nested arrays. As a result, a large portion of my life is spent using the arrow, return, and tab keys, to split up 1000+ character strings into a nested, readable format. For drupal devs, I can’t use devel…