piznac Posted September 27, 2007 Share Posted September 27, 2007 Ok,.. cant seem to wrap my head around this. If I had a string,.. say: $string ="<body bgcolor="#CCCCCC" onLoad="MM_preloadImages('images/more_details_over.jpg')"> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0" > <tr> <td colspan="8"><img src="images/top_logo.jpg" alt="Embroidery Services, Custom Embroidery, Corporate Apparel & Promotion/Corporate Apparel" width="750" height="104"></td> </tr> </table> <table width="750" border="0" align="center" bgcolor="#830000"> <tr> <td width="49"> </td> <td width="65" class="nav"> <div align="center"><a href="index.php">HOME</a></div></td> <td width="112" class="nav"> <div align="center"><a href="digitizing.php">DIGITIZING</a></div></td> <td width="97" class="nav"> <div align="center"><a href="pricing.php">PRICING</a></div></td> <td width="114" class="nav"> <div align="center"><a href="ordering.php">ORDERING</a></div></td> <td width="204" class="nav"> <div align="center"><a href="production_schedule.php?n=<?php if(isset($_SESSION['MM_Username'])){echo $user;}?>">PRODUCTION SCHEDULE</a></div></td> <td width="86" class="nav"> <div align="center"><a href="contact.php">CONTACT</a></div></td> <td width="48"> </td> </tr> </table> <!-- InstanceBeginEditable name="maincontent" --> <table width="749" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <!--DWLayoutTable--> <tr> <td height="19" valign="top"><!--DWLayoutEmptyCell--> </td> <td colspan="7" valign="top"><div align="center" class="orlist"> <div align="right"><a href="reg.php">Register</a> | <a href="client.php">Log In</a> | <a href="index.php?o=0">Log Out</a> | <a href="ch_pass.php">Change Password</a> </div> </div></td> </tr> <tr> <td width="12" height="37" valign="top"><!--DWLayoutEmptyCell--> </td> <td colspan="4" valign="top"><br> <?php if(isset($_SESSION['MM_Username'])){ $user = $_SESSION['MM_Username']; require_once("/var/www/html/include/classes/csv_upload.inc.php"); $this = new Csv(); $this->cust_bar($user);" Or something like that. How would I pull all the "<a href=''>blah</a>" out of it and apply them to an array or something? Quote Link to comment https://forums.phpfreaks.com/topic/70937-search-a-string/ Share on other sites More sharing options...
effigy Posted September 27, 2007 Share Posted September 27, 2007 preg_match_all Quote Link to comment https://forums.phpfreaks.com/topic/70937-search-a-string/#findComment-356598 Share on other sites More sharing options...
piznac Posted September 27, 2007 Author Share Posted September 27, 2007 ok even more to think about,. thanks man! Quote Link to comment https://forums.phpfreaks.com/topic/70937-search-a-string/#findComment-356615 Share on other sites More sharing options...
effigy Posted September 27, 2007 Share Posted September 27, 2007 Some related examples: http://www.phpfreaks.com/forums/index.php/topic,131706.0.html http://www.phpfreaks.com/forums/index.php/topic,153473.0.html Quote Link to comment https://forums.phpfreaks.com/topic/70937-search-a-string/#findComment-356623 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.