|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
limiting text output...
i'm not sure what it's called in PHP lingo...so i can't find anything about this by searching on the web...
i'd like to limit the amount of text that a loop is outputting...to 500 characters or less... what's this called? and/or does anybody know a piece of code that can make this happen? thanks...jv |
|
#2
|
|||
|
|||
|
RE: limiting text output...
can we see the loop?
|
|
#4
|
|||
|
|||
|
RE: limiting text output...
YOU ARE NOT ALLOWED TO LAUGH AT MY CODE!!! hehe...
<? $username="vvvv"; $password="vvvv"; $database="vvvvvv"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM response where a='$blog' "; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $i=0; while ($i < $num) { $name=mysql_result($result,$i,"name"); $email=mysql_result($result,$i,"email"); $website=mysql_result($result,$i,"website"); $date=mysql_result($result,$i,"date"); $a=mysql_result($result,$i,"a"); $comments=mysql_result($result,$i,"comments"); ?> <table width="425"> <tr span class="unnamed2"><td><a href="mailto:<? echo "$email"; ?>"><? echo "$name"; ?> </a>says...</td></tr> <tr span class="unnamed5"><td><? echo "$comments"; ?></td></tr> <tr span class="unnamed3" align="right" valign="top"><td><? echo "$date"; ?><br></td></tr> <tr><td><hr size="1" noshade><br></td></tr> </table> <? ++$i; } ?> |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > limiting text output... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|