Hello my fellow programmers,
I have a problem (other than not knowing enough) I need to know how to pass an array from outside the scope to then back inside, in a function which then echo's a specific array index.
I have trowlled through the net trying to find solutions, asked fellow programmers for help but nothing thus far has worked.
inside an include file I am creating the array:
$errmsg[0] = 'the message is too short, please enter more than 10 charaters.';
$errmsg[1] = 'the message is too long, please enter less than 1000 charaters.';
I then go on to serialize the array to keep it stored.
$e = serialize($errmsg);
Then inside another include file I create my function.
function contact($e) {
echo unserialize($errmsg[0]);
}
Lastly in the main index.php file I callback the function.
contact($e);
Now this of course does not work and if any kind soul could put me on the right track or even give me the solution to fixing this I would be greatly appriciative.
If you need any further information from me please say.
p.s. I have now finished work for the day so my responses wont be until later tonight GMT.