Skip to content
Advertisement

Tag: unique

Return One Row from MySQL

Amateur question, but something I’ve been wondering about. What is the PHP for selecting one row from a MySQL query? AKA you’re picking something by unique ID (you know there’s only one row that matches your request) and want to get only that value. Do you still have to use a while loop and mysql_fetch_row? Answer Add limit 0,1 and

Combine two arrays

I have two arrays like this: I want to combine these two array such that it does not contains duplicate and as well as keep their original keys. For example output should be: I have tried this but it is changing their original keys: Any solution? Answer Just use: That should solve it. Because you use string keys if one

Advertisement