az.brimatel Posted October 18, 2012 Share Posted October 18, 2012 Pls how can i compute my array values with datas i already av in different tables of my database Link to comment Share on other sites More sharing options...
birbal Posted October 18, 2012 Share Posted October 18, 2012 what have you come up so far? any codes? Link to comment Share on other sites More sharing options...
az.brimatel Posted October 18, 2012 Author Share Posted October 18, 2012 <?php$host="localhost";$uid="root";$pwd="";$DB="engineering";?><?php$engineering=mysql_connect($host,$uid,$pwd)or die("localhost not connected");mysql_select_db($DB)or die("DB connection lost");?> // database connections <?php$query="select * from resultf where Matric ='$matric'";$result=mysql_query($query);$record=mysql_num_rows($result);$az=mysql_result($result,$i,"GPA"); // collected value and store it in $az function getRepeatCourse2($row) { $repeatCourse = array(); $repeatCourse[]=$az; return implode(", ",$repeatCourse); }?>when i call the function in a class, $az will have no value, pls help me Link to comment Share on other sites More sharing options...
thescientist Posted October 18, 2012 Share Posted October 18, 2012 you either have to make $az global, or better yet, pass into your function. 1 Link to comment Share on other sites More sharing options...
az.brimatel Posted October 18, 2012 Author Share Posted October 18, 2012 Thanks soo much, its worked Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now