Jump to content


Photo

Parsing


  • Please log in to reply
4 replies to this topic

#1 cyrixware

cyrixware
  • Members
  • PipPipPip
  • Advanced Member
  • 171 posts
  • LocationPhilippines

Posted 30 March 2006 - 10:56 AM

hi!

1. how do i set automatic page refresh?
2. how do i parse a certain word like for example ..

"The quick brown fox"

into

"brown fox"

tnx

Frederick
XAMPP Control Panel | Wamp 2
<a href="http://www.motion23....o.nr/">Motion23 Technology your business partner</a>
Game kana ba!

#2 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 30 March 2006 - 12:05 PM

1, with Javascript or a META refresh
2, depends how you want to parse them:

$sentence = "The quick brown fox";

echo substr($sentence,10);

or

$sentence = "The quick brown fox";

$words = explode(" ", $sentence);

echo $words[2] . ' ' . $words[3];

or various other ways. generally depends what you want to do it for.

Cheers
Mark
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#3 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 30 March 2006 - 02:33 PM

I wouldn't use a META refresh...they're very annoying

[!--html--][div class=\'htmltop\']HTML[/div][div class=\'htmlmain\'][!--html1--]<head>
<script language="javascript" type="text/javascript">
function refreshit()
{
window.location=window.location;
}
window.setTimeout( "refreshit()" , "10000" );
</script>
</head>[!--html2--][/div][!--html3--]
Should refresh the page every 10 seconds

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 30 March 2006 - 03:38 PM

How is that any different than a Meta refresh? They're the same to the user!

More importantly... what if the user has JS disabled?

Info: PHP Manual


#5 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 30 March 2006 - 10:27 PM

If I can find what I read before I'll send it to you. There were some small differences between using meta redirects and JS redirects.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users