How to get index values of an array using php
- by admin
- 0
$topcom=array(‘color’=>’red’,’type’=>’box’,’height’=>’10px’,’weight’=>’2kg’);
How to get the properties of this array and its values)
foreach ($topcom as $eachindex => $eachvalue){
echo ‘$eachindex’ .”=>”. $eachvalue.”<br />”;
}
$topcom=array(‘color’=>’red’,’type’=>’box’,’height’=>’10px’,’weight’=>’2kg’); How to get the properties of this array and its values) foreach ($topcom as $eachindex => $eachvalue){ echo ‘$eachindex’ .”=>”. $eachvalue.”<br />”; }
$topcom=array(‘color’=>’red’,’type’=>’box’,’height’=>’10px’,’weight’=>’2kg’); How to get the properties of this array and its values) foreach ($topcom as $eachindex => $eachvalue){ echo ‘$eachindex’ .”=>”. $eachvalue.”<br />”; }