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. Link to comment https://forums.phpfreaks.com/topic/6150-what-is-the-correct-syntax-to-use-here/ 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. Link to comment https://forums.phpfreaks.com/topic/6150-what-is-the-correct-syntax-to-use-here/#findComment-22195 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. Link to comment https://forums.phpfreaks.com/topic/6150-what-is-the-correct-syntax-to-use-here/#findComment-22604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.