Ansel_Tk1 Posted March 30, 2006 Share Posted March 30, 2006 Hi all - wondering if some kind soul out there could point me in the right direction.I have created a repeating table that looks like this:<body><form name="form1" method="post" action=""> <?php do { ?> <table width="716" border="1"> <tr> <td width="275"><?php echo $row_UploadInfos['id']; ?></td> <td width="210"><?php echo $row_UploadInfos['value']; ?></td> <td width="209"> </td> </tr> </table> <?php } while ($row_files = mysql_fetch_assoc($files)); ?></form></body></html><?phpmysql_free_result($files);mysql_free_result($UploadInfos);?>my question is how would i go about changing the php echo $row_UploadInfos['value']; ?> to display only those records that contain certain text values?Thanks! I'd appreciate any points. Quote Link to comment Share on other sites More sharing options...
Guest footballkid4 Posted March 30, 2006 Share Posted March 30, 2006 If you are looking for something complex:[code]<?phpif ( preg_match( "#" . $regex . "#is" , $var ) ){ echo $var;}?>[/code]Otherwise take a look at substr(), strstr(), stristr(), etc. Quote Link to comment Share on other sites More sharing options...
Barand Posted March 31, 2006 Share Posted March 31, 2006 Change your query so you only pull records with the values you require. Quote Link to comment 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.