Why this does not work?
$stringhaha =" 1 => General,
2 => Business,
3 => Entertainment,
4 => Health,
5 => Politics,
6 => Sci/Tech,
7 => Sports,
8 => News";
$all_categories = array($stringhaha);
print_r($all_categories);
(will give an array with 1 item.)
While this works: If I include the variable content like this it will create properly an array with 8 items:
$all_categories = array(1 => General,
2 => Business,
3 => Entertainment,
4 => Health,
5 => Politics,
6 => Sci/Tech,
7 => Sports,
8 => News);
print_r($all_categories);