Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

PHP; CORRECT NOTATION TO STORE VARIABLE NAME IN ARRAY - URGENT 500POINTS

What is the correct PHP notation to store a variable name in an array?




$A0=2;
$A1=3;
$array[0]='blah blah $A0 blah':
$array[1]='blah blah $A1 blah':

echo array[0];     --returns-->    blah blah $A0 blah
                           --not-->   blah blah 2 blah
0
jabootyboy
Asked:
jabootyboy
1 Solution
 
peyoxCommented:
<?
   $A0=2;
   $A1=3;
   $array[0]='blah blah '.$A0.' blah';
   $array[1]='blah blah '.$A1.' blah';

   echo $array[0];
   echo $array[1];
?>
0
 
jabootyboyAuthor Commented:
Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now