Avatar of glynco
glynco
 asked on

What is the java linkedhashmap equivalent in php? Array? Need a good example with keys.

Anyone can give a good example of a linkedhashmap equivalent in php?

Need a good example with keys.
PHP

Avatar of undefined
Last Comment
glynco

8/22/2022 - Mon
Beverley Portlock

There is nothing explicitly like Java's linked hash tables - PHP arrays are just simple associative arrays. PHP 5 does have a standard library that may get yu some way towards your goal. See http://uk3.php.net/spl and perhaps one of the HEAP classes.

Maybe a more pertinent question is why you would need such a structure in the first place? PHP is not performance oriented in the same way Java is because with PHP running on a server with almost no user interaction (compared to a GUI) there is little need for such complexity.
ASKER CERTIFIED SOLUTION
glynco

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
glynco

ASKER
This is what close to linkedhashmap with key and the objects in each key.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes