how to run from codeigniter a cron job whose parameters are dynamic

PHP
I need to run a codeigniter job once everyday, I need to check my mysql db in order to see if there is an scheduled email task for that day, if there ...
3 years ago

Search multidimensional array for value in certain key, return value of different key

PHP
I'm new to php and have been using the community and answers here to really help me with a little project I'm working on so thank you all in advance f...
3 years ago

Translate a PHP cURL to a bash cURL call

PHP
I have this PHP code that makes a curl call: $postData['api_user'] = 'username'; $postData['api_key'] = 'password!'; $ch = curl_init('https://a...
3 years ago

How to filter posts by author on edit.php

PHP
Let's suppose the user visits the page of http://mywpsite/wp-admin/edit.php?author=john-doe Let's suppose there is an author with the name of 'John...
3 years ago

Which date is first using DateTime php

PHP
I am using the DateTime function and want to find out if a date stored in the database has been passed or is yet to happen. This is for a banlist. C...
3 years ago

How to post local storage data to php file

PHP
Thanks for your time in reading this post. I am developing an ecommerce website and used open library simplecart.js to store the cart variables. I n...
3 years ago

Infusionsoft OAuth callback SSL error PHP

PHP
my problem is this: Ive went to developer.infusionsoft.com to get the PHP-SDK helper library for Infusionsoft API integration. I installed it via com...
3 years ago

Symfony2 (debug mode) catching vendor exception before I can

PHP
I am using the Klarna SDK to implement their payment methods. The SDK calls the api and checks the response code. If the response-code is not 0 (all c...
3 years ago

How to deal with "method not found in class" warning for magically implemented methods?

PHP
I am sitting on a large codebase that contains several classes that expose functionality through magically implemented methods (using __call and __cal...
3 years ago

Print PHP Call Stack

PHP
I'm looking for a way to print the call stack in PHP. Bonus points if the function flushes the IO buffer.
3 years ago

How to Truncate a string in PHP to the word closest to a certain number of characters?

PHP
I have a code snippet written in PHP that pulls a block of text from a database and sends it out to a widget on a webpage. The original block of text...
3 years ago

Yii2 dropdownlist WITHOUT $model

PHP
I have searched the web far and wide for a solution to this problem. I already know the Yii2 dropdown way is this: <?php use yii\helpers\ArrayHelp...
3 years ago

PHP: how can I add a specific title to my flash message?

PHP
I'm working on a flash message with PHP, but I would like to have a specific title for each of my flash message. My container for the flash message is...
3 years ago

PHP Select query how to do it in a safe way

PHP
How can i do this piece of code in a safe way due sql injections. if tried to read the php manual of mysqli->prepared but not able to convert it s...
3 years ago

PHP to WebService

PHP
I want to connect to a webservice. I have the following code to test connecting to the service; $soapURL = 'http://xxx.xxx.xx.xx4/wsdl/wsdl' ; $soap...
3 years ago

How to convert a specific word followed by digits to subscript in a string using PHP?

PHP
How to convert a specific word followed by digits to subscript in a string using PHP? For example, $nutrients = "Vitamin A, Vitamin B1, Vitamin B12,...
3 years ago

Passing a argument using callback key in wordpress

PHP
I'm working in WordPress here. I have the following code: if (is_product() && is_woocommerce() && $this->category_has_fiance() == ...
3 years ago

PHP Hide text from array

PHP
I'm pulling data from an array, but show certain parts of the data above others, I've managed to choose certain text to go above others. Is there anyw...
3 years ago

mysql order by rand() performance issue and solution

PHP
i was using order by rand() to generate random rows from database without any issue but i reaalised that as the database size increase this rand() cau...
3 years ago

How to set time zone in code igniter?

PHP
I working on a php project using codeigniter. Please advise me what is the global way to set time zone for php and mysql . In which file i can set thi...
3 years ago