No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- travelling, biking(i want a mtb), i like making handmade craft e.g crochet, embroidery.
10 Posted Topics
I don't know what's wrong with this code. I think this code should work. I'm about to store number of each query in array [CODE] $antecedent=array(); for($i=0;$i<=$index;$i++){ if(isset($period[$i])|| isset($gpa[$i]) || isset($antecedent[$i])){ echo $period[$i]." "; echo $gpa[$i]."<br/>"; $queryAntecedent=mysql_query("SELECT * FROM mytable WHERE study_period='$period[$i]' AND ipk='$gpa[$i]'") or die (mysql_error()); $antecedent[$i]=mysql_num_rows($queryAntecedent); }//endif }//endfor print_r … | |
I'm using jpgraph to generate GPA chart. the x-axis is for the GPA value, while the y-axis is for the year/semester. my problem is : i fetch the value for both x-axis and y-axis element from the database. i pack all elements in an array variable using array_unshift(). everything is … | |
As far as i know this is no way to use array_count_values for multidimensional array. So, any of you guys know how to deal with this? I have 2D array like this.. $arr=array([0]=>array([arr1]=>A[arr2]=>1) [1]=>array([arr1]=>B[arr2]=>5) [2]=>array([arr1]=>A[arr2]=>5) etc... ) i want to obtain combination of arr1-arr2 and its count(just like in 1D … | |
Hello people :) i'm trying to insert query result into 2 dimensional array i have tried the following way.. [CODE] $query=mysql_query("..."); while($row=mysql_fetch_array($query)){ for($i=0;$i<=$index;$i++){ if(isset($myarray[$i]['array1'])|| isset($myarray[$i]['array2'])){ array_unshift($myarray[$i]['array1'],$row['study_period']); array_unshift($myarray[$i]['array2'],$row['test']); }//endif }//endfor }//endwhile [/CODE] But, it failed i also tried.. [CODE] $query=mysql_query("..."); while($row=mysql_fetch_array($query)){ $myarray=array( array("array1"=>$row['study_period'],"array2"=>$row['test']) ); }//endwhile [/CODE] it failed too since it … | |
Hello all! :) Do you have any link on some complete reference on multidimensional array in php?? Please tell me.. thanks a lot. | |
Re: why don't you use existing php-excel reader? this is the link code.google.com/p/php-excel-reader/. You don't have to convert excel file into csv. Just import excel file into mysql DB. PS. as far as i know the class only handle .xls format | |
Dear all, I need your help :) i have array like this--> $myarray([0]=>a,1 [1]=>b,2 [2]=>a,2 ) i want to split each of the array element, i want to retrieve the part a and b of each array elemet and (maybe) store it in different array like this: $myarray1([0]=>a [1]=>b ) … | |
I'm a totally beginner in javascript. i need some chunks of code of it. i have a form. i'm going to store the field into mysql. there are 2 conditions : one or all fields empty OR none is empty. when there's no empty field, the data will be stored. … | |
Dear All, I'm going to put some submenus into tabs and put its contents there. i want to fetch the name of the tab (menu) from the database. for this case, i must use looping 'while'. for example [CODE]<body> <?php $query=mysql_query("SELECT * FROM modul WHERE ket='submenu_mahasiswa'"); $result=mysql_fetch_array($query); ?> <div id="tabs"> … |
The End.