Skip to content

PHP – comparing 2 identical strings returns false

I have read some posts about this problem. Tried to use trim but it does not help. Php script sends a curl request to another server which returns ok if the request were successful. The script shows ok and stops to excecute – exits. Why ok is not ok for the script? var_dump($request); shows the followin…

expecting statement -php syntax | if-else

I get critical error.phpstorms says that expecting statements.I couldnt find a solution Answer You cannot “interrupt” the PHP code after the closing { of the if and before the else keyword. Cleaned up version: To avoid such errors, try learning and following a coding standard, e.g. PSR-12. Since y…

how to extract key and value from json content?

what I have tried is this. Can anyone help me in extracting keys and values like notificationType,bounceType,timestamp etc; It would be great help for me if anyone help me achieving this. Thank you. Answer json_decode decode a string converting it in php data structures: array or object. Check docs for json_d…

CI4 Inserting ID from selected Strings

I’m so tired of thinking how to solve this case. already search by internet and never solved. straight to the point this is my Controller of Product.php this is my Models Model_product.php and this is my Views create.php i want to insert new data from Controller Product function store. i’ve this p…

Xdebug not creating log files

Looking for some advice. Changed servers and I have setup Xdebug. PhpStorm detects it enabled, so does PHP, although I cannot get it to work. (Firewall port opened, my firewall disabled, settings all configured, but I am getting nothing) In order to identify the issue, I need to be able to see the Log of Xdeb…