Skip to content

Tag: php

wpdb query gives back a wrong result

I’ve written some code in my PHP snippet which is on my WordPress page and the wpdb query gives me always a wrong result. In WordPress In SQL phpmyadmin displayed 3 which is the correct result for that query What did I do wrong? May you help me in someway? Answer The reason why you’re getting 1 as…

php find item dimension in array

find items level(depth) in array; hi im new in php and i cant find any method to find what dimension array items are in. for example: the array above has key named email and the email key is in second level of the array. is there any function or method or way to find this level. I found a method

Remove files which have not filename duplicates

For each document (.pdf, .txt, .docx ecc) I have also a corresponding json file with the same filename. Example: file1.json, file1.pdf, file2.json, file2.txt, filex.json, filex.pdf, But I got also some json files which are not accompanied with the corresponding document. I want to delete all json files which …