[Solved] Combine Multiple rows from mysql array

[ad_1] You need to use a other array. <?php $lender = mysql_query(“Select * from lender where reference=”$reference””); $formated_lender = array(); while ($lenderrow=mysql_fetch_array($lender)) { $formated_lender = $lenderrow[“lender”] . ” ” . $lenderrow[“lenderref”] . ” ” . “£” . $lenderrow[“amount”]; } foreach ($formated_lender as $row) { echo $row . ‘<br />’; } Or, if you would just … Read more

[Solved] All columns not inserted in the database

[ad_1] <input name=”h” type=”hidden” id=”h” value=”0″ /> $num = $_POST[‘h’]; for ($i=0; $i<=$num; $i++) value = 0 and 0<=0 is only one loop 😉 you set in html h to 0, so $num is allways 0. you can set $num to the count of submited rows by $num = count($_POST[‘activityname’]); but that works only if … Read more

[Solved] How do I post this JSON data with PHP? This JSON different [closed]

[ad_1] $json = json_decode(trim(file_get_contents(“url”,true))); $info = $json[‘clanSearch’][‘results’][0][‘tag’]; echo $info; Usetrue flag and the hole data is converted to arrays with sub arrays If you dont use true you have to get it with: $json->clanSearch->results[0]->tag; 1 [ad_2] solved How do I post this JSON data with PHP? This JSON different [closed]

[Solved] view how many people compelete the quiz on admin panel [closed]

[ad_1] got it. Your PHP code to increse your counter is: <?php $servername = “localhost”; $username = “root”; $password = “”; $db_name = “route”; // Create connection $mysqli = new mysqli($servername, $username, $password, $db_name); // Check connection if ($mysqli->connect_error) { die(“Connection failed: ” . $mysqli->connect_error); } $sql = “UPDATE quizes SET count = count + … Read more

[Solved] Parse error: syntax error, unexpected T_IF on line 4 [closed]

[ad_1] You’re missing a semi-colon at the end of your include statement. Change: include(‘connect.php’) To: include(‘connect.php’); The reason you’re seeing the if as a cause for the error, is because what you have done. Is missed out the vital point of PHP, Which tells the interpreter to stop processing the current command (hence the semi-colon). … Read more

[Solved] How do I make this javascript in loop?

[ad_1] This is your PHP-loop in javascript. Pretty much the same… Just remember to use the <script> javascript code here </script> tag to tell the browser that this is javascript for (a = 1; a < 2; a++) { //Your stuff inside here } To append HTML to a div you can use the following … Read more