rmmorejo Posted November 28, 2012 Share Posted November 28, 2012 (edited) Hello everyone. I am new to AJAX. I have this piece of code that works fine with the exception that it does not print the image I am trying to print. When I view the code on the browser, I realize that the <img> tag does not get properly terminated by ...... />. The forward slash does not show up regardless of the fact that I put it in while preparing the string to be passed back to AJAX. This is the partial code I am using to return the output to AJAX. Can anyone help? Thanks! $caseLoadData = "<span class='treeData'>"; $MySQLConn->query = ".... some query returning certain fields ..." $MySQLConn->RunQuery(); while ( $row = $MySQLConn->fetchRow() ) { // Building the rest list! $fullName = $row['last_name'].', '.$row['first_name'].' '.$row['middle_name']; $caseLoadData .= "<img src=\"expand.png\" width=\"9\" height=\"9\" onclick=\"javascript:expandClient(0, '".$row['... some data ...']."', 'undefined');\" alt=\"none\" /> <label title=\"".$row['... some data ...']."\"> ".$fullName."</label><br>"; } $caseLoadData .= "</span>"; echo $caseLoadData; Edited November 28, 2012 by rmmorejo Quote Link to comment https://forums.phpfreaks.com/topic/271301-concatenate-to-a-string/ Share on other sites More sharing options...
rmmorejo Posted November 28, 2012 Author Share Posted November 28, 2012 Never mind! It works! Quote Link to comment https://forums.phpfreaks.com/topic/271301-concatenate-to-a-string/#findComment-1395947 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.