Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › PHP Programming › PHP Beginners Guide #1

PHP Beginners Guide #1

Posts 1–4 of 4 · Page 1 of 1
yearupie
yearupie
PHP Beginners Guide #1
Best Forumer,

I would like you to explain how php works, many people think they know something about PHP, but it is often not correct. Let's start with the basics!

Chapter 1: Variables

§ 1: Introduction
Variables can be used to temporarily store data. Such information may consist of numbers (integers) or pieces of text (strings), but can also be true / false data (booleans) or a set of data (array) contain. All we can create in PHP, we can put in a variable.

§ 2: Creating variables
Creating a variable, also called declaration, done by one U.S. dollars sign ($) followed by a random name. With the equal-to (=) sign, we can then assign a value to the variable. Finally, we close the line with a semicolon.

[php]<?php
$text = 'Hello World!';
echo $text;
?>[/php]

This piece of code we declare the variable $text, adding the value "Hello World!" to it. Then we use an echo to the contents of $text to put on screen. The output is as follows:

Hello World!
§ 3: different types of variables

As I mentioned earlier, we can actually save everything in a PHP variable. Depending on the content of a variable belongs to a particular type. Some examples:

[php]<?php
$text = 'Hello World!'; // String
$age = 28; // Integer
$price = 190.75; // Float
$check = false; // Boolean
?>[/php]

Here are some examples of different types of variables. The first variable $text we have already seen and contains a string. If you store numbers in one variable, it is an integer, a float if you concern about the numbers have decimal. If a variable includes true or false, you call it a boolean. A type variable that is not in this example is the array. On this variable I will make a separate tutorial.

As we will see a string in PHP is placed between single quotes. In an integer, float or boolean we do not use quotes!

§ 4: Calculating with variables
We have already seen that we can echo variables, but that's not all. Calculating with variables in PHP is something that we will use frequently. Some examples:

[php]<?php
$amout = 10;
$price = 9.95;
$btw = 0.19; // 19%

$subtotal = $amout * $price; // Calculate subtotal
echo 'Subtotal: '.$subtotal.'<br />';

$aBtw = $subtotal * 0.19; // aBtw = After BTW Calculate BTW
$total = $subtotal + $aBtw; // Calculate Total
echo 'Total: '.$total;
?>[/php]

Output:
Subtotal: 99.5
Total: 118.405
This was Chapter 1, soon I will go to the next chapter.
#1 · edited 16y ago · 16y ago
Spookerzz
Spookerzz
Is this from W3 Schools?

Oh well nice tut

Thanked and repped
#2 · 16y ago
yearupie
yearupie
Quote Originally Posted by ___GodLike___ View Post
Is this from W3 Schools?

Oh well nice tut

Thanked and repped
Uhuh I don't leech!
>>95% from Yearupie <<
#3 · 16y ago
Spookerzz
Spookerzz
Ok nice one but don't annoy nextgen
#4 · 16y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • D.N.A's Beginner guide to Minecraft ModdingBy D.N.A in Minecraft Tutorials
    1Last post 15y ago
  • Beginner Guide to using T-SearchBy arunforce in Game Hacking Tutorials
    0Last post 20y ago
  • [Tutorial] Beginners guide to making a websiteBy Ariez in General
    1Last post 17y ago
  • Beginner Concepts of Game HackingBy why06 in Programming Tutorials
    59Last post 16y ago
  • The Ultimate Guide(For Beginners): ReversingBy rwkeith in Assembly
    2Last post 17y ago

Tags for this Thread

None