This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-10-05 16:45:10

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

PHP text replacement test.

I made a test php replacement text thingy. Here it is: http://www.plaxon.comyr.com/replace.html. The text field is teh text you want to replace, and the replacement text field is the text you want to replace the text field with, and then the filter string field is the string you want to filter, for example:

my website wrote:

text: hello replacement text: goodbye filter string: hello world

Results:

my website wrote:

goodbye world

Cool, eh?
Comment and tell me what you think!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-10-05 16:53:39

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: PHP text replacement test.

Interesting! What practical uses can you think of for it?  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2011-10-05 16:56:50

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: PHP text replacement test.

sparks wrote:

Interesting! What practical uses can you think of for it?  smile

lol. It gives you the code to, so its easy for php learners to get to know the string replace function better. That's what practical use I can think of for it  tongue


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#4 2011-10-05 17:04:50

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: PHP text replacement test.

or you could just tell them to visit http://lmgtfy.com/?q=replace+part+of+string+php


http://i.imgur.com/zeIZW.png

Offline

 

#5 2011-10-05 17:09:33

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: PHP text replacement test.

This is easier, and helps them learn better. Insted of all the quotes with no values, they just generate their own code with this. What's so bad about that?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#6 2011-10-05 17:36:52

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: PHP text replacement test.

WindowsExplorer wrote:

This is easier, and helps them learn better. Insted of all the quotes with no values, they just generate their own code with this. What's so bad about that?

Nothing at all  smile  good job!


http://i.imgur.com/zeIZW.png

Offline

 

#7 2011-10-05 18:46:51

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: PHP text replacement test.

str_replace("joe", "bob", "lol" )


◕‿◕

Offline

 

#8 2011-10-05 18:54:35

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: PHP text replacement test.

flashgocrazy wrote:

str_replace("joe", "bob", "lol" )

Would output "joe"


http://i.imgur.com/zeIZW.png

Offline

 

Board footer