PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Homebrew & Coding > Coding Discussion

Coding Discussion Discuss programming and coding and get help here.

Reply
 
Thread Tools Display Modes
Old 9th October 2013, 04:05 AM   #1
Aljam
Style Administrator
Style AdminstratorPHO VIP
 
Aljam's Avatar
 
Join Date: Apr 2010
Age: 23
Posts: 55
Aljam
Default Why I Hate PHP

So I'm doing an assignment for school and I was looking at this piece of code I wrote for about an hour because of this:
PHP Code:
$TPL => array(
    
'WelcomeMsg' => 'Please fill in the form below to continue.',
    
'ErrorMsg' => 'Please correct errors and re-submit the form.',
    
'dispError' => 0,
    
'dispWelcome' => 1,
    
'Error' => array(
        
'uName' => array(
            
'isEmpty' => 'Username cannot be empty',
            
'isShort' => 'Username must be greater than 5 characters'
        
),
        
'Year' => array(
            
'isEmpty' => 'Year cannot be empty',
            
'notFourDigits' => 'Year must be a 4 digit number'
        
),
        
'Province' => array(
            
'isEmpty' => 'Please select one or more provinces',
            
'invalidSelection' => '"--Select a Province--" is not a valid choice'
        
),
        
'Status' => 'Please select one or more items from status',
        
'Location' => 'Please select a Location'
    
),
    
'Provinces' => array(
        
'--' => '--Select a Province--',
        
'nf' => 'Newfoundland',
        
'pe' => 'Prince Edward Island',
        
'nb' => 'New Brunswick',
        
'ns' => 'Nova Scotia',
        
'qc' => 'Quebec',
        
'on' => 'Ontario',
        
'mb' => 'Manitoba',
        
'sk' => 'Saskatchewan',
        
'ab' => 'Alberta',
        
'bc' => 'British Columbia',
        
'nt' => 'Northwest Territories',
        
'nv' => 'Nunavut'
    
)
); 
Don't you just love PHP?

/noobrant

Last edited by Aljam; 10th October 2013 at 12:56 PM.
Aljam is offline   Reply With Quote
Sponsored Links
Old 9th October 2013, 04:21 AM   #2
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 20
Posts: 439
droomph
Default

arrays are intrinsically hard without a spreadsheet program like Excel
__________________
droomph is offline   Reply With Quote
Old 9th October 2013, 02:31 PM   #3
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 326
Full Metal ★ Full Metal ★
Default

l = ["haha","lolwut"]
d = {"association":"DO THE THINGS"}

I love python, yes I do.
I love python, how about you!?
__________________

★ full metal.

#busy
Full Metal ★ is offline   Reply With Quote
Old 9th October 2013, 09:37 PM   #4
mewthree9000
What does this button do?.....
 
mewthree9000's Avatar
 
Join Date: May 2010
Location: U.S.A.
Age: 27
Posts: 73
mewthree9000 mewthree9000
Default

Quote:
Originally Posted by Full Metal ★ View Post
l = ["haha","lolwut"]
d = {"association":"DO THE THINGS"}

I love python, yes I do.
I love python, how about you!?
Python ftw!



So did anyone figure out the error with this code?
__________________
-Mewthree9000
We all fight a war within ourselves, a war of greatness, a war to become the best.
LIVE THE REVOLUTION, PHO!
Gotta Hack'em All!!




My current projects:
-Pokemon ChaosBlack[v2]
-!!Elite FireRed ROM Base!!
mewthree9000 is offline   Reply With Quote
Likes Full Metal ★ liked this post
Old 9th October 2013, 10:45 PM   #5
Jisuke
私の陰茎は非常に大きい
Ex-StaffPHO VIP
 
Jisuke's Avatar
 
Join Date: Mar 2013
Location: Brooooo...
Age: 21
Posts: 200
Jisuke Jisuke
Default

Quote:
Originally Posted by mewthree9000 View Post
Python ftw!



So did anyone figure out the error with this code?
Oh, MEMEMEMEMEMEMEME!
It's in PHP, and not in Python.
Jisuke is offline   Reply With Quote
Likes Linkandzelda, Full Metal ★ liked this post
Old 10th October 2013, 12:38 AM   #6
Aljam
Style Administrator
Style AdminstratorPHO VIP
 
Aljam's Avatar
 
Join Date: Apr 2010
Age: 23
Posts: 55
Aljam
Default

Quote:
Originally Posted by mewthree9000 View Post
Python ftw!



So did anyone figure out the error with this code?
I wasn't supposed to have an arrow where my first = was.
Aljam is offline   Reply With Quote
Old 10th October 2013, 01:16 AM   #7
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 20
Posts: 439
droomph
Default

Quote:
Originally Posted by Aljam View Post
I wasn't supposed to have an arrow where my first = was.
ahh, the old semicolon error.
__________________
droomph is offline   Reply With Quote
Old 10th October 2013, 08:37 AM   #8
Linkandzelda
RHO つぃちょう
Webmaster
 
Linkandzelda's Avatar
 
Join Date: Apr 2012
Location: United Kingdom
Posts: 304
Linkandzelda Linkandzelda Linkandzelda
Default

I've edited your post to use [PHP] tags which does syntax highlighting. Glad you found the error (and I personally love PHP).
__________________





Linkandzelda is offline   Reply With Quote
Likes mewthree9000 liked this post
Old 25th November 2013, 04:24 PM   #9
mewthree9000
What does this button do?.....
 
mewthree9000's Avatar
 
Join Date: May 2010
Location: U.S.A.
Age: 27
Posts: 73
mewthree9000 mewthree9000
Default

Quote:
Originally Posted by Linkandzelda View Post
I've edited your post to use [PHP] tags which does syntax highlighting. Glad you found the error (and I personally love PHP).
That is an awesome feature!
__________________
-Mewthree9000
We all fight a war within ourselves, a war of greatness, a war to become the best.
LIVE THE REVOLUTION, PHO!
Gotta Hack'em All!!




My current projects:
-Pokemon ChaosBlack[v2]
-!!Elite FireRed ROM Base!!
mewthree9000 is offline   Reply With Quote
Reply

Tags
hate, php

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

Forum Jump


All times are GMT. The time now is 04:30 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts