I’m using WordPress 3.9.14. I use the flat_rate method for my shipping costs. It contains a default cost_per_order and I use 2 shipping_classes inside flat_rate for additional costs for some …
Tag: php
Using xdebug with a front-end js SPA?
I have xdebug working great when I access my server directly (thru a vhost entry to the IP set up by homestead/vagrant). However, I have a decoupled frontend that I’m running on localhost:8080, that …
Multidimensional indexed array to associative array depending on column value
I have a multidimensional indexed array. Each element is an associative array with an id column which is unique between elements (its value never repeats within the array). My goal is to convert this array into a multidimensional associative array, indexed by id values. My best attempt so far is to loop over …
FormData doesn’t include the button Javascript
I’m having a problem with FormData, it was working a couple days ago but now it doesn’t work, it submits all the inputs except the submit button. Here’s my login form. <form action="" method="post"…
CSS not applying if using PHP
I am using codeigniter and any data that is within the for loop doesn’t have the CSS applied. The file is pointed correctly as all the other css works fine, however I can’t find a solution to this anywhere HTML : CSS (I haven’t included all the css just the parts within the loop as my css fi…
How to fetch mysql data in descending order?
So my application gets mysql data in json format and displays it in id1 to id* I have to update my database table every day and I want to show the recent data first, I don’t want to change the …
Codeigniter , PHP – form validation only letter in other language?
In Codeigniter 3 I use alpha to validate form for only letters $this->form_validation->set_rules(‘firstname’, ‘FirstName’, ‘trim|required|alpha’, array(‘required’ => ‘…
date() expects parameter 2 to be integer, float given
I got the following timestamp long value from database 147836340000 and I want to convert it on data and time. I have tried to use the following: But unfortunately I am getting the following error: date() expects parameter 2 to be integer, float given Please advice on what I need to do. Answer It’s prob…
Propel adds CROSS JOIN to query when using an alias to JOIN tables
Trying to do a fairly simple query in Propel 2. I have a Person table and a Possession table – persons can have many possessions but only one of each possession type. So a person can have 1 book, 1 car, etc. I’m trying to write a query in Propel that will return all persons along with their car na…
“Cannot convert value to string” when retrieving data (belongsToMany relationship)
I’m using CakePHP 3.3.6 and MySQL 5.7.13. I have these three tables in my database (amongst others) : collections, tags and the join table collections_tags. collections Table tags Table collections_tags Table in my TableCollectionsTable.php: in my TableTagsTable.php: I can get all the Collections or all…