|
-
July 22nd, 2012, 09:10 AM
#1
multi-hash in php
I try to convert some code from C++/Qt to php.
There is something like:
Code:
QMultiHash<int, QString> Var;
It means that there can be many values associated to the same key, and at the same time, like:
0 => "Zero"
0 => "0"
0 => "etc."
How can it be done in php?
-
July 26th, 2012, 09:12 PM
#2
Re: multi-hash in php
One workaround could be to use an associative array of arrays, i.e.,
PHP Code:
$var = array(0 => array("Zero", "0", "etc."));
-
August 13th, 2012, 03:08 PM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|