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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.