Home Forums Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Arcade Chat
Go Back   ClubPenguinHQ Forums > General Discussion > Public Forum Archives > General Discussion > Hacking/Programming
Reload this Page php break; function
Hacking/Programming All hacking/programming goes here. Club Penguin hacking can be discussed in the Club Penguin Cheating Parent forum. No Club Penguin hacking is allowed here.

php break; function

Reply
 
LinkBack Thread Tools Display Modes
php break; function
Old
  (#1)
Billybob1234 is Offline
Super Moderator
Billybob1234 is a glorious beacon of light
 
Billybob1234's Avatar
 
Posts: 2,651
Join Date: Jan 2008
Location: Wisconsin
Age: 19
Rep Power: 25
  Send a message via AIM to Billybob1234 Send a message via MSN to Billybob1234 Send a message via Yahoo to Billybob1234 Send a message via Skype™ to Billybob1234 
Default php break; function - Wednesday, August 27th, 2008

Well, I'm trying to get it so that when I use my ID finder (PCL script) it will echo one thing then go to the next line.

E.g:
Code:
Echo1  
Echo2
instead of
Code:
echo1echo2
I was talking to Sam (sammyyum) about it, and he said use the break; or case; function. I did this
Code:
echo "$PenguinID $PenguinName
break;
Then, it would echo once, and then close the cli. So, does anybody know how to use the break; function?


http://img196.imageshack.us/img196/769/sig2i.png
  
Reply With Quote
Re: php break; function
Old
  (#2)
Mike is Offline
Retired CPHQ Staff
Mike is on a distinguished road
 
Mike's Avatar
 
Posts: 3,821
Join Date: Aug 2007
Rep Power: 34
  Send a message via AIM to Mike  
Default Re: php break; function - Wednesday, August 27th, 2008

If you're using CLI then just put "\n" in your echo.

If you're doing it with the web, then you can just do this:

[code=php:32xa9dgu]<span class="syntaxdefault">$newLineÂ*</span><span class="syntaxkeyword">=Â*</span><span class="syntaxstring">"
"</span><span class="syntaxkeyword">;Â*</span><span class="syntaxdefault"></span>[/code:32xa9dgu]

Then echo $newLine whenever you want to have a new line.
  
Reply With Quote
Re: php break; function
Old
  (#3)
Billybob1234 is Offline
Super Moderator
Billybob1234 is a glorious beacon of light
 
Billybob1234's Avatar
 
Posts: 2,651
Join Date: Jan 2008
Location: Wisconsin
Age: 19
Rep Power: 25
  Send a message via AIM to Billybob1234 Send a message via MSN to Billybob1234 Send a message via Yahoo to Billybob1234 Send a message via Skype™ to Billybob1234 
Default Re: php break; function - Wednesday, August 27th, 2008

Quote:
Originally Posted by Mike 92
If you're using CLI then just put "\n" in your echo.

If you're doing it with the web, then you can just do this:

[code=php:ib786cb7]<span class="syntaxdefault">$newLineÂ*</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Â*</span><span class="syntaxstring">"
"</span><span class="syntaxkeyword">;</span><span class="syntaxdefault">Â*</span>[/code:ib786cb7]

Then echo $newLine whenever you want to have a new line.
Okay, thanks mike.


http://img196.imageshack.us/img196/769/sig2i.png
  
Reply With Quote
Re: php break; function
Old
  (#4)
PenXZ is Offline
Super Member
PenXZ is an unknown quantity at this point
 
PenXZ's Avatar
 
Posts: 1,016
Join Date: Aug 2007
Location: Italy
Age: 14
Rep Power: 0
  Send a message via MSN to PenXZ  
Default Re: php break; function - Wednesday, August 27th, 2008

Or put "/n" after the echo string:
[code=PHP:1pm7d9ag]<span class="syntaxdefault"></span><span class="syntaxkeyword">echoÂ*</span><span class="syntaxstring">"Hello!/n"</span><span class="syntaxkeyword">;Â*</span><span class="syntaxdefault"></span>[/code:1pm7d9ag]
I don't know if it only works on CLI.


Same siggy, same skills, same person.

PenXZ, a name, a user and the warranty I don't care about you.

~Ex Cheating God and Art Master~
  
Reply With Quote
Re: php break; function
Old
  (#5)
Plonk is Offline
Super Member
Plonk is an unknown quantity at this point
 
Plonk's Avatar
 
Posts: 2,458
Join Date: Apr 2008
Location: #iamthewalrus
Rep Power: 0
  Send a message via AIM to Plonk  
Default Re: php break; function - Wednesday, August 27th, 2008

Quote:
Originally Posted by PenXZ
Or put "/n" after the echo string:
[code=PHP:cdze90j7]<span class="syntaxdefault">echoÂ*</span><span class="syntaxstring">"Hello!/n"</span><span class="syntaxkeyword">;</span><span class="syntaxdefault">Â*</span>[/code:cdze90j7]
I don't know if it only works on CLI.
I think it's backslash n, not slash n.
It should be:
[code=PHP:cdze90j7]<span class="syntaxdefault"></span><span class="syntaxkeyword">echoÂ*</span><span class="syntaxstring">"Hello!\n"Â*</span><span class="syntaxdefault"></span>[/code:cdze90j7]
Or does it work both ways?


I have left CPHQ forever.

I will VERY occaisionally be on #iamthewalrus. Don't count on it.
  
Reply With Quote
Re: php break; function
Old
  (#6)
Billybob1234 is Offline
Super Moderator
Billybob1234 is a glorious beacon of light
 
Billybob1234's Avatar
 
Posts: 2,651
Join Date: Jan 2008
Location: Wisconsin
Age: 19
Rep Power: 25
  Send a message via AIM to Billybob1234 Send a message via MSN to Billybob1234 Send a message via Yahoo to Billybob1234 Send a message via Skype™ to Billybob1234 
Default Re: php break; function - Wednesday, August 27th, 2008

Quote:
Originally Posted by Plonk
Quote:
Originally Posted by PenXZ
Or put "/n" after the echo string:
[code=PHP:1bn2r977]<span class="syntaxdefault">echoÂ*</span><span class="syntaxstring">"Hello!/n"</span><span class="syntaxkeyword">;</span><span class="syntaxdefault">Â*</span>[/code:1bn2r977]
I don't know if it only works on CLI.
I think it's backslash n, not slash n.
It should be:
[code=PHP:1bn2r977]<span class="syntaxdefault">echoÂ*</span><span class="syntaxstring">"Hello!\n"</span><span class="syntaxdefault">Â*</span>[/code:1bn2r977]
Or does it work both ways?

Yeah, it's \, not /. I did it with /, and it would echo the /n.


http://img196.imageshack.us/img196/769/sig2i.png
  
Reply With Quote
Re: php break; function
Old
  (#7)
What Says Moo is Offline
New Member
What Says Moo is an unknown quantity at this point
 
Posts: 18
Join Date: Aug 2008
Rep Power: 0
   
Default Re: php break; function - Wednesday, August 27th, 2008

Quote:
Originally Posted by Billybob1234
Quote:
Originally Posted by Plonk
Quote:
Originally Posted by PenXZ
Or put "/n" after the echo string:
[code=PHP:1pktnuwe]<span class="syntaxdefault">echoÂ*</span><span class="syntaxstring">"Hello!/n"</span><span class="syntaxkeyword">;</span><span class="syntaxdefault">Â*</span>[/code:1pktnuwe]
I don't know if it only works on CLI.
I think it's backslash n, not slash n.
It should be:
[code=PHP:1pktnuwe]<span class="syntaxdefault">echoÂ*</span><span class="syntaxstring">"Hello!n"</span><span class="syntaxdefault">Â*</span>[/code:1pktnuwe]
Or does it work both ways?

Yeah, it's , not /. I did it with /, and it would echo the /n.
WEB:
[code=php:1pktnuwe]<span class="syntaxdefault">$lineÂ*</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Â*</span><span class="syntaxstring">"Poo
"</span><span class="syntaxkeyword">;</span><span class="syntaxdefault">Â*</span>[/code:1pktnuwe]
CLI:

^^ CANT WORK SINCE PHP SSTRIPS SLASHES BUT ITS A backslash
  
Reply With Quote
Re: php break; function
Old
  (#8)
PenXZ is Offline
Super Member
PenXZ is an unknown quantity at this point
 
PenXZ's Avatar
 
Posts: 1,016
Join Date: Aug 2007
Location: Italy
Age: 14
Rep Power: 0
  Send a message via MSN to PenXZ  
Default Re: php break; function - Friday, August 29th, 2008

It's a backslash? Oh OK I thought it worked with slash.


Same siggy, same skills, same person.

PenXZ, a name, a user and the warranty I don't care about you.

~Ex Cheating God and Art Master~
  
Reply With Quote
Re: php break; function
Old
  (#9)
Drew is Offline
Tech God
Drew should be proud of theirself
 
Posts: 482
Join Date: Apr 2008
Location: California
Rep Power: 10
   
Default Re: php break; function - Saturday, August 30th, 2008

If your running it in a web environment. Use nl2br.

I just asked sam, he said that you wanted to run multiple scripts at the same time, not change the line.


I may not be active due to the fact that I'm currently applying to various Universities. I'll be back soon.
  
Reply With Quote
Re: php break; function
Old
  (#10)
Billybob1234 is Offline
Super Moderator
Billybob1234 is a glorious beacon of light
 
Billybob1234's Avatar
 
Posts: 2,651
Join Date: Jan 2008
Location: Wisconsin
Age: 19
Rep Power: 25
  Send a message via AIM to Billybob1234 Send a message via MSN to Billybob1234 Send a message via Yahoo to Billybob1234 Send a message via Skype™ to Billybob1234 
Default Re: php break; function - Saturday, August 30th, 2008

Quote:
Originally Posted by Drew
If your running it in a web environment. Use nl2br.

I just asked sam, he said that you wanted to run multiple scripts at the same time, not change the line.
Well, I told him spacifically I wanted to change lines....


http://img196.imageshack.us/img196/769/sig2i.png
  
Reply With Quote
Reply

Lower Navigation
Go Back   ClubPenguinHQ Forums > General Discussion > Public Forum Archives > General Discussion > Hacking/Programming

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
vBulletin Skin developed by: vBStyles.com
Copyright ©2006 - 2009, RancidKraut Industries