Jump to content

[SOLVED] Not understanding this array.


PugJr

Recommended Posts

What doesn't work:

 


$number = "one";

$type = $array['$number'];

 

What does work:

 

 


$type = $array['one'];

 

The latter will work and give me what I want. The first just won't understand $number for some reason and of course I don't understand. So I want it so $number will turn into "one".

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/162867-solved-not-understanding-this-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.