[ create a new paste ] login | about

Link: http://codepad.org/1mLlMq88    [ raw code | output | fork ]

PHP, pasted on Dec 24:
1
2
3
4
5
6
<?php

$dsxx = array("field1" => 2, "field2" => 4, "field3" => 6, "field4" => 8);
$usefield = 'field3';

echo 'Value of field3 is: ' . $dsxx[$usefield];


Output:
1
Value of field3 is: 6


Create a new paste based on this one


Comments: