PHP - Pdf Output Problem
Hello,
I have a problem with the pdf output file from my system.
The code is:
<table>
Similar TutorialsCode: [Select] <?php if (!isset($_POST['submit'])) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <form method="post" action="<?php echo $PHP_SELF; ?>"> <input type="submit" value="Toon Output" name="submit"/> <?php $dranken = array("cola", "fanta", "bier", "koffie", "thee"); $prijzen = array("2", "2", "1.80", "2.20", "2.20"); $i = 0; echo "<table>"; while ($dranken[$i]) { $listnaam = $dranken[$i] . "_aantal"; $optionlist = "<select name= '$listnaam'><option>0</option><option>1</option><option>2</option><option>3</option></select>"; echo "<tr><td >" . $dranken[$i] . "</td>"; echo "<td>" . $prijzen[$i] . "</td>"; echo "<td>" . $optionlist . "</td></tr>"; $i++; } echo "</table>"; ?> </form> <?php } $dranken = array("cola", "fanta", "bier", "koffie", "thee"); $prijzen = array("2", "2", "1.80", "2.20", "2.20"); $i = 0; $totaalPrijs = 0; while ($dranken[$i]) { $aantal = $_POST[$dranken[$i] . "_aantal"]; if ($aantal > 0) { $prijsperDrank = $aantal * $prijzen[$i]; echo $dranken[$i] . " : " . $aantal . " Prijs: " . $prijsperDrank . "</br>"; $totaalPrijs += $prijsperDrank; echo " totaal: $totaalPrijs"; } $i++; } ?> </html> My output is like this cola : 2 Prijs: 4 totaal: 4fanta : 1 Prijs: 2 totaal: 6 but I want it like this cola : 2 Prijs: 4 fanta : 1 Prijs: 2 totaal: 6 Thanks in advance: price = prijs, totaal = total, dranken = drinks Code: [Select] <?php include("global-settings.php"); session_start(); mysql_connect($dbhost, $dbuser, $dbpass)or die("Could Not Connect: " . mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $email = mysql_real_escape_string(strip_tags($_POST['email'])); $password = mysql_real_escape_string(strip_tags(sha1($_POST['password']))); $result = mysql_query("SELECT * FROM users WHERE username='$email' AND password='$password'"); while (mysql_fetch_array($result)) { if ($email != $row['username'] && $password != $row['password']) { $_SESSION['user_pid'] = $row['user_pid']; $_SESSION['firstname'] = $row['first_name']; header("Location: ../protected/home.php"); } else { $userid_generator = uniqid(rand(), false); $date = date("Y/m/d"); mysql_query("INSERT INTO users (user_pid, username, password, datetime_registered) VALUES('$userid_generator', '$email', '$password', '$date')") or die(mysql_error()); $_SESSION['userid'] = $userid_generator; $result1 = mysql_query("SELECT * FROM leaders"); $id = $result1['id']; mysql_query("INSERT IGNORE INTO friends (node1id, node2id, is_leader, friends_since, friend_type) VALUES('$id', '$userid_generator', 'Yes', '$date', 'full')") or die(mysql_error()); } } ?> For some reason this code outputs a blank screen. It either has to do with my while loop or my if...else statement. Any help? Hi I am having a problem with my form output. No matter what I search I get "No matching records". Even if I am searching words that I know should return a result. Any help would be much appreciated
<?php define("PERPAGE", 15); // number of records on each page /************************************************************************************** * function to output page selection buttons * * @param int $total total records * @param int $page current page number * @return string selection buttons html */ function page_selector($total, $page) { if ($total==0) { return ''; } $kPages = ceil($total/PERPAGE); $filler = ' · · · '; $lim1 = max(1, $page-2); $lim2 = min($kPages, $page+3); $p = $page==1 ? 1 : $page - 1; $n = $page== $kPages ? $kPages : $page + 1;; $out = "$kPages page" . ($kPages==1 ? '' : 's') . "  "; if ($kPages==1) { return $out; } $out .= ($page > 1) ? "<div class='pagipage' data-pn='$p'>Prev</div> " : ''; if ($page > 4) { $out .= "<div class='pagipage' data-pn='1'>1</div> $filler"; } elseif ($page==4) { $out .= "<div class='pagipage' data-pn='1'>1</div>"; } for ($i=$lim1; $i<=$lim2; $i++) { if ($page==$i) $out .= "<div class='pagicurrent'>$i</div>"; else $out .= "<div class='pagipage' data-pn='$i'>$i</div>"; } if ($page < $kPages-3) { $out .= "$filler <div class='pagipage' data-pn='$kPages'>$kPages</div>"; } $out .= $page < $kPages ? " <div class='pagipage' data-pn='$n'>Next</div>" : ''; return $out; } /*********************************************** ** SEARCH FOR MATCHING TVS ************************************************/ $showResults = 0; $search = ''; if (isset($_GET['tag'])) { $showResults = 1; $search = $_GET['tag']; $srch = array_unique(explode(' ', trim($_GET['tag']))); foreach ($srch as $t) { $repl[] = "<span class='hilite'>$t</span>"; $placeholders[] = '?'; $params[] = $t; } $params[] = count($srch); // // FINDTOTAL RECORDS IN SEARCH RESULTS // $res = $db->prepare("SELECT COUNT(*) as tot FROM television WHERE MATCH(title,description,keywords) AGAINST(? IN BOOLEAN MODE) "); $res->execute($params); $total = $res->fetchColumn(); $page = $_GET['page'] ?? 1; $params[] = ($page-1)*PERPAGE; // append parameters offset $params[] = PERPAGE; // and number of records for limit clause // // GET A PAGEFUL OF RECORDS // $sql = "SELECT id , title , description , keywords FROM television WHERE MATCH(title,description,keywords) AGAINST(? IN BOOLEAN MODE) ORDER BY TITLE LIMIT ?,? "; $stmt = $db->prepare($sql); $stmt->execute($params); if ($stmt->rowCount()==0) { $results = "<h3>No matching records</h3>"; } else { $results = "<tr><th>Product Id</th><th>Title</th><th>Description</th><th>Tags</th><th>Edit</th></tr>\n"; foreach ($stmt as $rec) { $alltags = str_replace($srch, $repl, $rec['keywords']); $results .= "<tr><td>{$rec['id']}</td><td>{$rec['title']}</td><td>{$rec['description']}</td><td>$alltags</td> <td><a href='?action=edit&id={$rec['id']}'><img src='edit-icon.png' alt='edit'></a></td> </tr>\n"; } } } ?> <div id='title'>Television Search</div> <form id='form1'> <fieldset> <legend>Search for tags</legend> <input type='text' name='tag' size='50' value='<?=$search?>' placeholder='Search for...' > <input type="hidden" name="page" id="page" value="1"> <input type="hidden" name="action" id="page" value="search"> <input type="submit" name="btnSub" value="Search"> </fieldset> <div id='formfoot'></div> </form> <?php if ($showResults) { ?> <div class="paginate_panel"> <?=page_selector($total, $page)?> </div> <table border='1'> <?=$results?> </table> <?php } ?>
im testing the following script and it wont send 1 2 3 until the script has finished executing. What can i do to flush the buffer after every echo statement?? <?php echo "1"; ob_flush();flush(); sleep(5); echo "2"; ob_flush();flush(); sleep(5); echo "3"; ob_flush();flush(); ?> Hi everyone I'm new around here but thought it's about time I joined a good PHP forum! I'll introduce myself properly on the right section, but for now, I'll my post my coding problem on here. I wonder if any has any knowledge or can help. I'm setting up a connection from my web server to a potential data supplier web server, which involves a load of encryption. One of the stages is generating a SHA1 hash of an encrypted string. Now I've got some old example code, however the "mhash" function used in this old code appears to obsolete. Thus is doesn't work. I've tried using the available "sha1" and "hash" functions but cannot replicate the hashed output they provide. Here's the original code: Code: [Select] $encrypted_string = "B0436CBFBC5CAAFB7339AF4A1DF845974D53B9D369146E2E4F1451929D9EBE254363E983F4F94517EB9585FDB112E7B1CCE11A33C5BBA23F8D5DE9D3415BA526489AC796A36FBA76D4293C8DFB673708CED10C9732EEC472D9E43D2626AA104121666E79DD8F2FF6BAC0143BD62E0EE826AF6459779C162613508D48BFE2FC8DD558A1834D7205F96EA8D446E9B371E78E990A3995B1052DCBA9CA0AF99CC77ED2A8B55B2B882BA29D4BB4B07FA91AB4D2F10FBB93732B077335A7E6D96FE813AEDC3711A85CD0C13AE22B28C14FCCE3AF4C1F5D2C0F7697DEC7487CCFC0ED4E77B1B65F39BAD5236E3D3C69D33FC484"; $hashBinaryValue = mhash(MHASH_SHA1, $encrypted_string); $hashValue = bin2hex($hashBinaryValue); echo 'hashValue='.$hashValue.'<br>'; The example hashed output should be: Code: [Select] 31f6d26b18d3c04895cdc2cc05cbd9ad003f2d3e I cannot seem to replicate this output using the available functions? I've tried the following: Code: [Select] $hashBinaryValue = hash('sha1', $encrypted_string); $hashValue = bin2hex($hashBinaryValue); And also: Code: [Select] $hashBinaryValue = sha1($encrypted_string); $hashValue = bin2hex($hashBinaryValue); Both generate: Code: [Select] 37333736363862393037313732326265346438396433633236383936363430376434613665363231 I've found a webpage that can generate the SHA1 hash, but do not know what language they've done it in. http://www.fileformat.info/tool/hash.htm?hex=B0436CBFBC5CAAFB7339AF4A1DF845974D53B9D369146E2E4F1451929D9EBE254363E983F4F94517EB9585FDB112E7B1CCE11A33C5BBA23F8D5DE9D3415BA526489AC796A36FBA76D4293C8DFB673708CED10C9732EEC472D9E43D2626AA104121666E79DD8F2FF6BAC0143BD62E0EE826AF6459779C162613508D48BFE2FC8DD558A1834D7205F96EA8D446E9B371E78E990A3995B1052DCBA9CA0AF99CC77ED2A8B55B2B882BA29D4BB4B07FA91AB4D2F10FBB93732B077335A7E6D96FE813AEDC3711A85CD0C13AE22B28C14FCCE3AF4C1F5D2C0F7697DEC7487CCFC0ED4E77B1B65F39BAD5236E3D3C69D33FC484 Any help or input would be greatly appreciated =) Well I have a script that executes a scan on a system set to run infinitely, and I need it to echo out a message each time it loops through, but I don't want it to echo out the message with the next loop message below it, and the next one below that etc... I've tried using the flush(); function and been messing around with that with no luck. For security reasons I don't want to release any of the processing code, but here is the basic construction of the script: <?PHP ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** $RepeatIt = -1; for($g=1; $g!=$RepeatIt+1; $g++) { ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** $ScanMessage = ":.:.: SCANNING THE HITLIST FOR MOBSTER: ".$MobName." (SCAN #$g) :.:.:"."<br/><br/>"; echo $ScanMessage; ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** ***PROCESSING AND SCAN CODE*** } ?> At the moment it's returning: :.:.: SCANNING THE HITLIST FOR MOBSTER: DEUS EX DESTROYER (SCAN #1) :.:.: :.:.: SCANNING THE HITLIST FOR MOBSTER: DEUS EX DESTROYER (SCAN #2) :.:.: :.:.: SCANNING THE HITLIST FOR MOBSTER: DEUS EX DESTROYER (SCAN #3) :.:.: :.:.: SCANNING THE HITLIST FOR MOBSTER: DEUS EX DESTROYER (SCAN #4) :.:.: So what I want it to do is just delete the scanning message and replace it with the next scan message so while running this script you would see just the number increment on the same line. Any suggestions? Thanks. How do I got about outputing one row that can only hold one value? Any reason why the function below doesn't work? Code: [Select] <?php include "database.php"; session_start(); $name = $_session['outname']; function output_wins(){ $sql = 'SELECT * FROM account_info WHERE username ="' . $name .'"'; $result = mysql_query($sql); $wins = mysql_fetch_array($result); echo $wins['win']; } output_wins(); ?> Is there an easier way I can output this one row? I'm not getting any errors but I"m not getting the output I'm expecting. When it gets the characterIDList values if there is a value for that field it needs to take that value then explode it and get the ID and characterName of each of the values so say the value inside of characterIDList was 2,3 then for each of those values it would find the characterName and ID of the value and be able to put each of them as a LI inside the UL. I was hoping I could have the charactersQuery separate because I use it for the dropdown. Code: [Select] $newsQuery = " SELECT news.categoryID, news.newsTitle, news.newsPicture, news.content, news.characterIDList FROM news LEFT JOIN categories ON news.categoryID = categories.ID WHERE news.ID = '" . $newsID . "'"; $newsResult = mysqli_query ( $dbc, $newsQuery ); // Run The Query echo $newsQuery; $row = mysqli_fetch_array ( $newsResult, MYSQL_ASSOC ); $characterIDList = $row[ 'chracterIDList' ]; $characterIDList = explode(',', $characterIDList); foreach($characterIDList as $value){ $charactersQuery = " SELECT ID, characterName FROM characters ORDER BY characters.characterName"; $charactersResult = mysqli_query ( $dbc, $charactersQuery ); // Run The Query } Code: [Select] <div class="field required"> <label for="charactersDrop">Characters Involved</label> <ul id="characterList" style="list-style: none; margin-left: 195px;"> <?php mysqli_data_seek( $charactersResult, 0 ); while($row = mysqli_fetch_array ( $newsResult, MYSQL_ASSOC )) { if ($row['characterName'] == NULL ) { } else { ?> <li characterID="<?php echo $row['ID']; ?>" characterName="<?php echo htmlentities( $row['characterName'] ); ?>"><?php echo htmlentities($row['characterName']); ?> <a href="#">Remove</a></li> <?php }} ?> </ul> <select class="dropdown" name="charactersDrop" id="charactersDrop" title="Characters Dropdown" style="margin-left: 195px;"> <option value="">- Select -</option> <?php mysqli_data_seek( $charactersResult, 0 ); while ( $row = mysqli_fetch_array ( $charactersResult, MYSQL_ASSOC ) ) { print "<option value=\"".$row['ID']."\">".$row['characterName']."</option>\r"; } ?> </select> <input type="button" value="Add Character" class="" onclick="CharactersInvolved()"/> </div> I have created a PHP page where the contents are pulled from DB. Is there a way that I can save the file with the output and stylesheet to PDF with a click of a button. Edited May 5, 2020 by ZulfadlyAshBurnGrammer Hi all, Is there a simple way to log the command output of a linux console? This command locks up my screen. It is a screen on an Aastra IP phone. $command = 'logsave /var/www/html/aastra/test.log ls'; shell_exec($command); Thanks! Hey folks, I have made a cart for buying drinks. I also made an sql database. But when I click on the email button, I receive an email but only with the id of the products. I would like to have an output with the id of the product, but also the name of the product ( the name of the column in sql is also 'name') this is my code and you can check it out on http://fhcs.be/cart-demo3/ thanks in advance cart.php <?php // Include MySQL class require_once('inc/mysql.class.php'); // Include database connection require_once('inc/global.inc.php'); // Include functions require_once('inc/functions.inc.php'); // Start the session session_start(); // Process actions $cart = $_SESSION['cart']; $action = $_GET['action']; switch ($action) { case 'add': if ($cart) { $cart .= ','.$_GET['id']; } else { $cart = $_GET['id']; } break; case 'delete': if ($cart) { $items = explode(',',$cart); $newcart = ''; foreach ($items as $item) { if ($_GET['id'] != $item) { if ($newcart != '') { $newcart .= ','.$item; } else { $newcart = $item; } } } $cart = $newcart; } break; case 'update': if ($cart) { $newcart = ''; foreach ($_POST as $key=>$value) { if (stristr($key,'qty')) { $id = str_replace('qty','',$key); $items = ($newcart != '') ? explode(',',$newcart) : explode(',',$cart); $newcart = ''; foreach ($items as $item) { if ($id != $item) { if ($newcart != '') { $newcart .= ','.$item; } else { $newcart = $item; } } } for ($i=1;$i<=$value;$i++) { if ($newcart != '') { $newcart .= ','.$id; } else { $newcart = $id; } } } } } $cart = $newcart; break; } $_SESSION['cart'] = $cart; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>PHP Shopping Cart Demo &#0183; Cart</title> <link rel="stylesheet" href="css/styles.css" /> </head> <body> <div id="shoppingcart"> <h1>Your Shopping Cart</h1> <?php echo writeShoppingCart(); ?> </div> <div id="contents"> <h1>Please check quantities...</h1> <?php echo showCart(); ?> <p><a href="index.php">Back to bookshop...</a></p> <form action="mail.php" method="post"> <input type="submit" name="sendemail" value="Email" /> <input type="hidden" name="cart" value="<?= $cart; ?>" /> </form> </div> </body> </html> mail.php <?php session_start(); if($_POST['sendemail'] == 'Email') { $headers = 'From: Sender <andrej13@gmail.com>'; mail('andrej13@gmail.com', 'Subject', $_SESSION["cart"] , $headers); echo 'Your mail has been sent'; } else { echo 'message not sent'; } ?> and the functions.php <?php function writeShoppingCart() { $cart = $_SESSION['cart']; if (!$cart) { return '<p>You have no items in your shopping cart</p>'; } else { // Parse the cart session variable $items = explode(',',$cart); $s = (count($items) > 1) ? 's':''; return '<p>You have <a href="cart.php">'.count($items).' item'.$s.' in your shopping cart</a></p>'; } } function showCart() { global $db; $cart = $_SESSION['cart']; if ($cart) { $items = explode(',',$cart); $contents = array(); foreach ($items as $item) { $contents[$item] = (isset($contents[$item])) ? $contents[$item] + 1 : 1; } $output[] = '<form action="cart.php?action=update" method="post" id="cart">'; $output[] = '<table>'; foreach ($contents as $id=>$qty) { $sql = 'SELECT * FROM products WHERE id = '.$id; $result = $db->query($sql); $row = $result->fetch(); extract($row); $output[] = '<tr>'; $output[] = '<td><a href="cart.php?action=delete&id='.$id.'" class="r">Remove</a></td>'; $output[] = '<td>'.$name.'</td>'; $output[] = '<td>€'.$price.'</td>'; $output[] = '<td><input type="text" name="qty'.$id.'" value="'.$qty.'" size="3" maxlength="3" /></td>'; $output[] = '<td>€'.($price * $qty).'</td>'; $total += $price * $qty; $output[] = '</tr>'; } $output[] = '</table>'; $output[] = '<p>Grand total: <strong>€'.$total.'</strong></p>'; $output[] = '<div><button type="submit">Update cart</button></div>'; $output[] = '</form>'; } else { $output[] = '<p>You shopping cart is empty.</p>'; } return join('',$output); } ?> Team I tried to create csv output ( every value in double quotes) in my php using below function
if($generate_csv){
function generateCSV($data, $filename) { I got below output with one issue (There is a blank at the end of each value)
Date,time,Device,lable,throughput_read,throughput_write
Could you please help me to resolve this issue Hello. I'm looking for some help to make a script. The script should run a .bat file, and get the output from it. (The text from the console). Regards Worqy I don't have any output after I push the button :s I dont know how http://fhcs.be/index3.php Code: [Select] <?php // Include MySQL class require_once('inc/mysql.class.php'); // Include database connection require_once('inc/global.inc.php'); // Include functions session_start(); ?> <?php if (!isset($_POST['submit'])) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <form method="post" action="<?php echo $PHP_SELF; ?>"> <input type="submit" value="Toon Output" name="submit"/> <?php $dranken=array() ; $DrinkResult=mysql_query("SELECT name,price FROM products")or die(mysql_error()); while($DrinkRow=mysql_fetch_assoc($DrinkResult)){ $dranken[] = $DrinkRow; } echo "<table>"; foreach ($dranken as $DrinkRow) { $optionlist = "<select name='{$DrinkRow['name']}_aantal'>"; for ($i=0;$i<10;++$i) { $optionlist .= "<option value='$i'>$i</option>"; } $optionlist .= "</select>"; echo "<tr><td>".$DrinkRow['name']." ".$DrinkRow['price']."</td>\n"; echo "<td>$optionlist</td></tr>\n"; } echo "</table>"; ?> </form> <?php } $dranken=array() ; $DrinkResult=mysql_query("SELECT name,price FROM products")or die(mysql_error()); while($DrinkRow=mysql_fetch_assoc($DrinkResult)){ $dranken[] = $DrinkRow; } echo "<table>"; $totaalPrijs = 0; foreach ($dranken as $DrinkRow) { $aantal = $_POST[$DrinkRow['name'] . "_aantal"]; if ($aantal > 0) { $prijsperDrank = $aantal * $DrinkRow['price']; echo $DrinkRow['name'] . " : " . $aantal . " Prijs: " . $prijsperDrank . "</br>"; $totaalPrijs=$totaalPrijs + $prijsperDrank; } } if($totaalPrijs>0){ echo " totaal: " .$totaalPrijs;} ?> </html> I have a function which is listing my directories w/ files (Images) in them. <?php function sortDirectory($path = 'images') { $ignore = array('.', '..', 'index.php'); $folder = array(); $dh = @opendir($path); while (false !== ( $file = readdir($dh) )) { if (!in_array($file, $ignore)) { if (is_dir("$path/$file")) { $folder[$file] = sortDirectory("$path/$file"); } else { $folder[$file] = "$path/$file"; } } } closedir($dh); ksort($folder); return $folder; } function getDirectory($folder = array(),$level = 0) { // Set which extensions should be approved in the XML file $extensions = array( 'jpg', 'JPG', 'png', 'PNG', 'gif', 'GIF', 'bmp', 'BMP'); $spaces = str_repeat(' ', ( $level * 4)); foreach($folder as $file=>$path) { if (is_array($path)) { echo "<strong>$spaces $file</strong><br />"; getDirectory($path, $level+1); } else { if ( in_array( substr($file, -3), $extensions ) ){ echo "$spaces <a href=\"$path\">$file</a><br />"; } } } } getDirectory(sortDirectory()); ?> Im trying to get it to write an xml file in this fashion Code: [Select] <?xml version="1.0" encoding="utf-8" standalone="yes"?> <dir1> <pic> <image>file1.jpg</image> </pic> <pic> <image>file2.jpg</image> </pic> </dir1> <dir2> <pic> <image>file1.jpg</image> </pic> <pic> <image>file2.jpg</image> </pic> </dir2>but I cannot seem to get a grasp on this simplexml for more than 1 directory - any help appreciated.? Hi, This script lists all the contents of the dir it is placed in bar itself. Perfect for what I need. However, I want to output the results as xml and being new to php I really don't know where to start. <?php foreach (new DirectoryIterator('.') as $file) { if ( (!$file->isDot()) && ($file->getFilename() != basename($_SERVER['PHP_SELF'])) ) { echo ($file->isDir()) ? "(Dir) ".$file->getFilename() : $file->getFilename(); } } ?> I'd be thankful for the help Thanks in advance. hello guys..!!! am new to this phpfreak community...i hav faced some problem while getting on floating point nos addition..if i use echo (int)((0.1+0.7))*10; i am getting output as 7. If i remove (int), i would get output as 8..which is correct... for any other possibilities like ((0.1+0.2))*10 am getting correct output as 3..pls guys help me on this wid proper reason....waiting for solution.... the print_r($a)'s result is views_handle_field_node Object ( [view]=>view Object ( [db_table] => views_view [base_table] => node [args] => Array ( [0] => My entry 1 ) [use_ajax] => [result] => Array ( [0] => stdClass Object ( [nid] => 5 [node_title] => Title of a test entry [node_revisions_body] => [node_revisions_format] => 1 [node_vid] => 5 [term_data_name] => My first test term name [term_data_vid] => 1 [term_data_tid] => 1 [vocabulary_name] => Vocabulary 1 [node_revisions_vid] => 5 ) [1]=> stdClass Object ( [nid] => 8 [node_title] => Title of a test entry [node_revisions_body] => [node_revisions_format] => 1 [node_vid] => 5 [term_data_name] => My first test term name [term_data_vid] => 1 [term_data_tid] => 1 [vocabulary_name] => Vocabulary 1 [node_revisions_vid] => 5 .. [2].. .. now i want to output the [nid]=>5 and[nid]=>8.....and all the nid's value.i use this, but can't work. $views_handle_field_node->$view->$result[]->nid. what's the correct output of it. Hi. I found a code online but unfortunately, the data is retrieved via variables. How can i convert this code to retrieve the data from database instead. Thank you in ADVANCE! Code: [Select] var members = [ ['Steven B. Ayres', '1911-1913', 'New York', 'Independent Democrat', '1861-1929'], ['William Augustus Ayres', '1915-1921 1923-1934', 'Kansas', 'Democratic', '1867-1952'], ['William Hanes Ayres', '1951-1971', 'Ohio', 'Republican', '1916-2000'] ]; help me. i have an index.php file in admin folder. this is the code inside the file: Code: [Select] <?php ?> Or any other code and i get output 0 , but if i echo something else then i get the string has output, help find out what is the problam please!!! |