liamloveslearning Posted May 25, 2010 Share Posted May 25, 2010 Hi everyone, This variable seems to be outputting nothing to my page, Ive tried chopping and rearranging but I cant seem to get it to show... <?php $aa = $row_rsworksorders1['intraartapproval'] ?> <?php echo $aa ?> Can anybody see why? Link to comment https://forums.phpfreaks.com/topic/202846-variable-not-showing/ Share on other sites More sharing options...
-Karl- Posted May 25, 2010 Share Posted May 25, 2010 Where is $row_rsworksorders1['intraartapproval'] being set? Also, why open PHP tags immediately after closing them? <?php $aa = $row_rsworksorders1['intraartapproval']; echo $aa; ?> Link to comment https://forums.phpfreaks.com/topic/202846-variable-not-showing/#findComment-1063046 Share on other sites More sharing options...
Pikachu2000 Posted May 25, 2010 Share Posted May 25, 2010 No. Need more information. Are you sure it has a value? What does print_r($row_rsworkorders1); show for the value of the array index ['intraartapproval']? Have you tried testing it for a value using a conditional of any kind before trying to output it? Link to comment https://forums.phpfreaks.com/topic/202846-variable-not-showing/#findComment-1063049 Share on other sites More sharing options...
Adam Posted May 25, 2010 Share Posted May 25, 2010 Despite the awkward PHP tags and missing semi-colons, that would run as expected assuming $row_rsworksorders1['intraartapproval'] was set. What happens if you dump out the value..? var_dump($row_rsworksorders1['intraartapproval']); Link to comment https://forums.phpfreaks.com/topic/202846-variable-not-showing/#findComment-1063051 Share on other sites More sharing options...
liamloveslearning Posted May 25, 2010 Author Share Posted May 25, 2010 $row_rsworksorders1['intraartapproval'] prints my value fine, $query_rsworksorders1 = "SELECT worksorders.intrajobno, worksorders.intratype, worksorders.intrastatus, worksorders.intracustomer, worksorders.intradescription, worksorders.intraorder, worksorders.intraartapproval, worksorders.intraestimatedinstall, worksorders.intraprio, worksorders.intrajobvalue, worksorders.intraterms, worksorders.intrajobref, worksorders.id, worksorders.intradelete FROM worksorders WHERE {$NXTFilter_rsworksorders1} AND worksorders.intradelete != 1 ORDER BY {$NXTSort_rsworksorders1}"; $rsworksorders1 = mysql_query($query_rsworksorders1, $intra_conn) or die(mysql_error()); $row_rsworksorders1 = mysql_fetch_assoc($rsworksorders1); $totalRows_rsworksorders1 = mysql_num_rows($rsworksorders1); Link to comment https://forums.phpfreaks.com/topic/202846-variable-not-showing/#findComment-1063054 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.