Jump to content

PHP-STI

New Members
  • Posts

    2
  • Joined

  • Last visited

PHP-STI's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, cyberRobot Yes, I did look into using DOMDocument, but I didn't feel it would have worked for my website. The text in the DB is the only issue because all of my navs and other dynamic pages are already coded with the title attribute.
  2. I have over 2600 rows of text I need to loop through and add a title attribute in the link from the exisiting linked text to meet ADA compliance. For example: Input string Jack and Jill went up the hill to have a little fun, but stupid Jill forgot <a href="http://www.plannedparenthood.org/health-topics/birth-control/birth-control-pill-4228.htm">the pill</a> and now they have a son! Output string Jack and Jill went up the hill to have a little fun, but stupid Jill forgot <a title="the pill" href="http://www.plannedparenthood.org/health-topics/birth-control/birth-control-pill-4228.htm">the pill</a> and now they have a son! Does anyone know how I can use preg_match_all and str_replace or anything else to accomplish this? Thanks!!!
×
×
  • 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.