Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

PHP-Tips

Main.PHP-Tips History

Hide minor edits - Show changes to markup

July 11, 2007, at 05:12 PM by Zeppo -
Changed lines 37-39 from:

PHP and managing a sting from a DB

to:

PHP and managing a string from a DB

July 11, 2007, at 05:12 PM by Zeppo -
Added lines 36-43:

PHP and managing a sting from a DB

echo sprintf("%02s%02s%02s%02s", substr($call_logdate,3,3),substr($call_logdate,0,2),substr($call_logdate,5,5),substr($call_logdate,10,18));

May 18, 2007, at 05:27 PM by Zeppo -
Added lines 21-22:

The $newstring part returns only the text from BEFORE the quotes. In this case a new line, so only the first line is returned.

Changed lines 24-25 from:
$newstring = substr($newtext, 0, strpos($newtext, "\n"));
to:
$newstring = substr($newtext, 0, strpos($newtext, "\n"));
Changed line 28 from:
   					<td colspan="2" style="color:red"><b>Issue Reference:
to:
   		<td colspan="2" style="color:red"><b>Issue Reference:
May 18, 2007, at 05:25 PM by Zeppo -
Changed lines 25-37 from:
 -->        ?>       <tr>
 -->    					<td colspan="2" style="color:red"><b>Issue Reference:
 -->                    <a href="hsl:hotissue?issueref=<?echo $issueref;?>"><?echo $issueref;?></a>
<?echo $newstring ?> </b>
 -->                    <?echo "</b><br><PRE> ".$newtext;"</PRE>" ?></td>


                	</tr>
         <?

to:
   					<td colspan="2" style="color:red"><b>Issue Reference:
                   <a href="hsl:hotissue?issueref=<?echo $issueref;?>"><?echo $issueref;?></a>


                     <?echo $newstring ?> </b>
                   <?echo "</b><br><PRE> ".$newtext;"</PRE>" ?></td>

May 18, 2007, at 05:19 PM by Zeppo -
Deleted line 0:
Added lines 18-37:

$newtext = wordwrap($description, 100, "\n", 1);
$newstring = substr($newtext, 0, strpos($newtext, "\n"));

 -->        ?>       <tr>
 -->    					<td colspan="2" style="color:red"><b>Issue Reference:
 -->                    <a href="hsl:hotissue?issueref=<?echo $issueref;?>"><?echo $issueref;?></a>
<?echo $newstring ?> </b>
 -->                    <?echo "</b><br><PRE> ".$newtext;"</PRE>" ?></td>


                	</tr>
         <?

March 15, 2007, at 07:03 PM by 207.210.213.101 -
Added lines 1-4:

Wordwrap

March 15, 2007, at 07:03 PM by 207.210.213.101 -
Added lines 1-14:
<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap($text, 8, "\n", 1);

echo "$newtext\n";
?>
This example would display:

A very
long
wooooooo
ooooord.
Edit - History - Print - Recent Changes - Search
Page last modified on July 11, 2007, at 05:12 PM