For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > June 2007 > Re: [PHP-WIN] Translation of html?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] Translation of html?
Jarrett Meyer

2007-06-18, 7:00 pm

Hack:
Explode on "<" will give you :

h1>This is a title
/h1>
table>
tr>
td>test
/td>
/tr>
/table>

Explode on ">", and only keep the second entry in the array. Would that work?

----
Jarrett M. T. Meyer
http://jarrettmeyer.blogspot.com
http://www.jarrettmeyer.com

No trees were harmed during this transmission; however, several electrons were terribly inconvenienced.

----- Original Message ----
From: Gustav Wiberg <gustav@hmn.se>
To: "'php windows' (php-windows@lists.php.net)" <php-windows@lists.php.net>
Sent: Monday, June 18, 2007 10:23:00 AM
Subject: [PHP-WIN] Translation of html?

Hi there!

Is this possible? I can't find any functions for this (I don't exactly what to search for)


Translation of

Html-string from

$str = "<h1>This is a title></h1><table><tr><td>test</td></tr></table>";


To a string that is like:



This is a title

Test





?

Best regards
/Gustav Wiberg

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com