I've got an array called $bigArrayWithLinks that stores a string with a url in each element. Here's a sample from a var_dump:
array
0 => string 'http://en.wikipedia.org/wiki/England' (length=36)
1 => string 'http://www.bbc.co.uk/news/england/' (length=34)
2 => string 'http://www.thefa.com/' (length=21)
3 => string 'http://www.thefa.com/England/' (length=29)
What I want to do is iterate through the array, adding an integer of value '0' to each element so it becomes
array
0 => string 'http://en.wikipedia.org/wiki/England' => int '0'
1 => string 'http://www.bbc.co.uk/news/england/' => int '0'
2 => string 'http://www.thefa.com/' => int '0'
3 => string 'http://www.thefa.com/England/' => int '0'
I tried:
for($x=0; $x<sizeof($arr); $x++)
{
$score = $arr[$x]['score'];
$score = '0';
}
I'm very new to php so I wasn't amazed that it didn't work. Could someone help me out please? Thanks in advance!