Skip to content

Unsupported operand types

I am working on a shopping cart function for a website and have stumbled across this error: Fatal error: Unsupported operand types in … on line xx I think this may be because I am performing some math between a variable and a value within an array. What I am not sure of is how to perform math on a

PHP PDO Error in Select Statement

I am having some issues with PDO. First issue is that in my connection string, I cannot use variables defined in another file (tried include & require). It gives me an error and shows the …

Convert XML to CSV with PHP

I’m using the following code to convert my XML file to a CSV format. Unfortunately, it seems to not be recognizing each entry in the XML and so the XML file ends up being blank. An example of my XML file is below… Any ideas what I did wrong? Answer Try this

MySQL wrong syntax but no line 114

I am getting the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 114 but my …

Validation errors in AJAX mode

Currently I use this to display validation errors via ajax: if (data.validation_failed == 1) { var arr = data.errors; $.each(arr, function(…

Redirect /index.php – wordpress

I want that if someone got link to my site, lets say: www.bla.com/index.php , he will redirect to www.bla.com. or in another words – remove the index.php. Here is my .htaccess file: Either if someone got link: www.bla.com/camera/index.php – it will redirect to www.bla.com/camera/. For now, the sit…

phpunit –debug still displays only dots

I want to see which test is currently executed during a phpunit run. I use the –debug param but still only get dots: $ phpunit –debug PHPUnit 3.7.19 by Sebastian Bergmann. Configuration read …