File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/table.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/table.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/table.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 1 month ago
Size: 238 bytes
 

Contents

Class file image Download
<?php

$table
= '<tr><td>last_name, first_name</td>
<td>address</td>
<td>phone number</td>
</tr>'
;

$table = preg_replace('/<td>([^<]*),\s*([^<]*)<\/td>/',
             
'<td>\1</td>' . "\n" . '<td>\2</td>',
             
$table);

print
$table;

?>

For more information send a message to info at phpclasses dot org.