Reply
w3c standards (php function required)
Old 04-23-2007, 12:39 PM w3c standards (php function required)
mad_willsy's Avatar
Super Spam Talker

Posts: 774
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
I am attempting to make my site comply to w3c standards (xhtml 1.0 strict) and slowly but painfuly getting there. However I have hit a brickwall as regards to my blog.

I need a function to convert all symbols to their entiy equivelent and apply this function to all the records in the db (FIELDS: maincontent,title, shortblurb TABLE: bl_blog) as well as changing <br> to <br /> as that is an old bad habit i used in the blog posts frequently!

I never knew about the 'correct' way to use html and have got into many bad habits (mainly aqquired because I used FrontPage to learn basic html when I was 7/8) until I bought a new book (Webdesign in a Nutshell - A Desktop Quick Reference by Jennifer Neiderst Robbins - IMEI:0-596-00987-9) on saturday

Re-learning 8 years of bad habbits is a huge task, but hopefuly I'l get the hang of it soon!

Any good quality tutorials & books on any of the following would be greatly apreciated!:
Using divs instead of tables
XHTML 1.0 Strict
BASIC & Free SEO
Advanced CSS 2.1

I will 'do a google' but google doesnt learn from previous experiances and also often wont pick up the small sites that can often be the best!
__________________
Wont :P
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
When You Register, These Ads Go Away!
Old 04-24-2007, 08:40 AM Re: w3c standards (php function required)
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
for that you can use this function

PHP Code:
$trans = array(
             
"<br>" => "<br />",
             
" & " => "&amp;"
             
);
echo 
strtr("hi all, <br> I said hello"$trans); 
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 04-24-2007, 10:28 AM Re: w3c standards (php function required)
tripy's Avatar
Fetchez la vache!

Posts: 2,057
Name: Thierry
Location: In the void
I believe there is an TIDY extension for PHP, which can correct many of those small blurbs automatically, but I never did looked in it.

It could help you. It won't update your db contents, but the output should be better
http://www.php.net/tidy
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to w3c standards (php function required)
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.36067 seconds with 12 queries