Jump to content

search a string


piznac

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/70937-search-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.