jimbojames5645
Programmer
I am trying to create a script that checks for correct PTR records using linux host command. I am checking against three dns servers so I have an array like such :
$servers =array(array "name" => "somename", "ip" => "10.0.0.0", "result" => 0),
array "name" => "somename", "ip" => "10.0.0.0", "result" => 0));
I am doing a foreach ($servers as $v) and modifying $v["result"], however when I leave the foreach() $servers[0]["result"] doesn't retain any of the changes made by the foreach(). I have checked to see that changes are applied with a print_r($v) inside the foreach(), and there are changes that do not stay after the foreach() is finished.
Any ideas as to why the changes don't last?
$servers =array(array "name" => "somename", "ip" => "10.0.0.0", "result" => 0),
array "name" => "somename", "ip" => "10.0.0.0", "result" => 0));
I am doing a foreach ($servers as $v) and modifying $v["result"], however when I leave the foreach() $servers[0]["result"] doesn't retain any of the changes made by the foreach(). I have checked to see that changes are applied with a print_r($v) inside the foreach(), and there are changes that do not stay after the foreach() is finished.
Any ideas as to why the changes don't last?