Skip to content

(PHP) Search for parts of a string in a vector and return the value

I’m facing the following dilemma, I have a vector that is returned from the bank in the following format: I would like to know how to check if in an indeterminate index it contains one of the example codes “CR:” if it has, remove the “CR:” from the value leaving only the value af…

Get json encode data from two tables based on foreign key

I have a question for you and I have not found a solution to this, So I have two tables which are sales_details and sales_payment. Sales details where you can see all the details and the other table is for payment info/transaction. Sales details have the primary key and the sales_payment table have the FK. To…

PHP exceeding memory allocation in nested loops

I am parsing a string. If it meets a certain criteria, I want to append the new character to another substring until it stops meeting that criteria, and / or the end of the string. The code is basically as follows: The error that follows is: PHP message: PHP Fatal error: Allowed memory size of 805306368 bytes…