First I got some simple key / value pairs:
$a1['a'] = array(value1, value2);
$a1['b'] = array(value1, value2);
# ...
Now I want to use a1 as a key to other values, is that possible?
DoSomething($a1 => value);
I want to make a small search script for MySQL, my classes are almost finished. I thought to do this:
$fieldsWhereToSearch['tableWhereToSearch'] = array('bla', 'blabla');
$mySearchObject->search($fieldsWhereToSearch[tableWhereToSearch] => searchTerm);
My class would pick the matching sql, add a WHERE string with all the fields LIKE term.
No, because in PHP array keys can only be strings and integers:
The key can either be an integer or a string. The value can be of any type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With