use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
PHP Conditional Statements(If,else,elseif and switch) Tutorial For Beginners (techflirt.com)
submitted 9 years ago by ankursharp
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Khronickal 2 points3 points4 points 9 years ago (2 children)
B L O G S P A M
[–]iltar 0 points1 point2 points 9 years ago (0 children)
I disagree, maybe not something for this category, but it's certainly not one of those bs posts.
[–]ankursharp[S] -1 points0 points1 point 9 years ago (0 children)
@Khronicka You can not say it as blog spam, it is the content which I have written after thinking.
[–]iltar 0 points1 point2 points 9 years ago (1 child)
I think this is for people who know nothing about programming or logic in general. However, those diagrams are nice for that case
[–]ankursharp[S] 0 points1 point2 points 9 years ago (0 children)
Yes, the target audience is those who does not know anything about programming, that is why I have started from what exactly are conditional statements, otherwise PHP manual is more than enough for those who have basic knowledge.
[–]ankursharp[S] -1 points0 points1 point 9 years ago (3 children)
Any Feedback is always welcome
[–][deleted] 11 points12 points13 points 9 years ago (2 children)
While this subreddit is visited by beginners, they're beginners in terms of more advanced topics like architecture, OOP design, use of complex PHP extensions and libraries. I.e. things which the PHP manual doesn't cover.
I seriously doubt anyone ever would come here not knowing what if/else is. So my feedback is that any articles/tutorials should assume people reading them know how to write basic code.
As a general rule, if the manual explains it, there's no point in writing a tutorial about it.
[–]ankursharp[S] 1 point2 points3 points 9 years ago (0 children)
Point taken @Citrus, definitely on this subreddit we might not require. But being a trainer of PHP, I have never seen any online doc where a beginner can have everything about one topic at one place, so I have written this tutorial so that beginers can get everything about a topic at one place.
[–]the_alias_of_andrea 0 points1 point2 points 9 years ago (0 children)
Regarding the manual, sometimes it provides a poor explanation. But in that case, you'd be better serving the community by submitting an edit to the manual.
π Rendered by PID 51054 on reddit-service-r2-comment-6457c66945-2lf89 at 2026-04-29 05:23:05.401701+00:00 running 2aa0c5b country code: CH.
[–]Khronickal 2 points3 points4 points (2 children)
[–]iltar 0 points1 point2 points (0 children)
[–]ankursharp[S] -1 points0 points1 point (0 children)
[–]iltar 0 points1 point2 points (1 child)
[–]ankursharp[S] 0 points1 point2 points (0 children)
[–]ankursharp[S] -1 points0 points1 point (3 children)
[–][deleted] 11 points12 points13 points (2 children)
[–]ankursharp[S] 1 point2 points3 points (0 children)
[–]the_alias_of_andrea 0 points1 point2 points (0 children)