For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > April 2005 > Undefined variable in function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Undefined variable in function
Marco J.L

2005-04-15, 8:56 pm

Hello,

when I start a function and use an variable from somewhere else in the
script the PHP page tells me:
PHP Notice: Undefined variable

This is an example script of the problem :

<?php
$varaa = "2525";
$varab = "4352";
$varac = "5312";

echo "Var AA and AB : ".$varaa.$varab;

funcaa();

function funcaa() {
echo "<BR>Var AB and AC : ".$varab.$varac;
}

?>

How can I solve this??

Thnx,

Marco J.L.



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com