Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7962923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:28:51+00:00 2026-06-04T05:28:51+00:00

In Java case#1: Map m1 = new LinkedHashMap(); List l1 = new LinkedList(); m1.put(key1,val1);

  • 0

In Java case#1:

Map m1 = new LinkedHashMap();
List l1 = new LinkedList();
m1.put("key1","val1");
m1.put("key2","val2");
l1.add(m1);

In java case#2

List l1 = new LinkedList();
l1.add("val1");
l1.add("val2");
l1.add("val3");

What’s about in PHP for these cases ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:28:52+00:00Added an answer on June 4, 2026 at 5:28 am

    In PHP, arrays serve as all types of containers. They can be used as maps, lists and sets.

    Linked list functionality is provided through the reset/prev/current/next/end functions; have a look at the “see also” section of the docs to make sure you don’t miss any of them.

    For map functionality you just index into the array directly; but keep in mind that array keys in PHP can only be strings or integers, and also that most of the time mixing both in the same array is not the right thing to do (although there is no technical reason not to, and there are cases where it makes sense).

    SPL provides the SplDoublyLinkedList class, but there’s nothing in there that a simple array doesn’t also give you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering what the rationale is behind having Java's Map.put(key, value) method overwrite
I downloaded a program implemented in Java (in this case, http://julian.togelius.com/mariocompetition2009/index.php ). I first
There are many ways to Title Case in java . But how do you
Use case: Wanna insert custom annotation to fields in java class generated by JAXB
What is a use case for a soft reference in Java? Would it be
I need to check in Java if a word consists of unique letters (case
Is there a pure-java way of setting the android:button attribute? My use case is
For readability reasons I'm trying to avoid using Char based case constructs, using Java
Possible Duplicate: How to sort a Map<Key, Value> on the values in Java? Here's
i am relatively experienced in Java coding but am new to C++. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.