Jump to content

Search the Community

Showing results for tags 'newline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Ok, so I have some code that takes the records in my database and outputs them in a table, but currently after the first record it starts spacing them incorrectly Here is the code <?php require_once('config.php'); require_once('menu.php'); echo '<h1>View All Alien Interactions</h1>'; echo '<table> <tr>'; foreach($fields AS $label){ echo "<th>{$label}</th>"; } echo '<th>Edit</th><th>Delete</th>'; echo '</tr>'; $fields_str = '`contact_id`, `'.implode(array_keys($fields), '`, `').'`'; $sql = "SELECT {$fields_str} FROM `alien_abduction`"; foreach($dbh->query($sql) as $row) { echo '<tr>'; foreach($fields AS $field=>$value){ echo '<td>'.(isset($row[$field]) && strlen($row[$field]) ? $row[$field] : '&nbsp'.'</td>'); } echo '</tr>'; echo '<td><a href="edit.php?contact_id='.$row['contact_id'].'">Edit</a></td>'; echo '<td><a href="delete.php?contact_id='.$row['contact_id'].'">Delete</a></td>'; echo '</tr>'; echo '</table>'; } ?> I just want it to start a new line after importing each record This is a picture of what its curently doing, look at the second row, it just keeps adding all additional entries on this line (I whited out personal info)
  2. Hi all, I hope some one can shed some light for me as how to send a carriage return and newline inside a spring that is being sent to a serialport. then read back to browser. The new lines are not working. I've tried \n \r \r\n <br> PHP_EOL. I can get this to work via the echo command but not when sending the spring via serial port. Thanks in anticipation. $serial->sendMessage("The big Brown Fox jumped over the cold lazey dog") . "<br>"; $serial->sendMessage("Message 2"); // Or to read from $read = $serial->readPort(); echo $read; echo "line 1" . "<br>"; echo "line 2" . "<br>"; echo "line 3" . "<br>"; I get the Result below. The big Brown Fox jumped over the cold lazey dogMessage 2line 1 line 2 line 3
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.