Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Latest Blog Post:
R&R Catering Hire Testimonial
Posts: 805
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Trades: 0
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

Please login or register to view this content. Registration is FREE
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
 
Register now for full access!
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
Trades: 1
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:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
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
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
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
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to w3c standards (php function required)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.51153 seconds with 12 queries