| php پروگرامنگ php پروگرامنگ |
![]() |
|
|
LinkBack | موضوع کے اختیارات | موضوع کی درجہ بندی | ظاہری انداز |
|
|
#1 |
|
Member
اجنبی
تاریخ شمولیت: Jul 2007
عمر: 27
مراسلات: 75
کمائي: 409
شکریہ: 2
12 مراسلہ میں 28 بارشکریہ ادا کیا گیا
|
Before you can work with PHP it's a good idea that you install PHP on your computer if you haven�t installed PHP yet, now is a good time to install PHP. First we will make a simple HTML page کوڈ:
<html> <body> Welcome to PHP tutorial </body> </html> Note: All PHP code is written between <?php and ?> tags, now lets write "Welcome to PHP tutorial" using PHP. کوڈ:
<html> <body> <?php echo "Welcome to PHP tutorial"; ?> </body> </html> So if we wanted to write "Welcome" we would write echo "Welcome"; Note: Have you noticed the ; at the end of the statement, Each PHP instruction must end with a semicolon. Introduction to Variables Let me introduce you to PHP variables, variables help you store and retrive data. # All variables start with a dollar sign $ # The name of the variable can consist of letters and numbers, but must begin with a letter. It can also contain special characters like underscore '_', see some examples below: کوڈ:
$site = 'phpbuddy.com' // valid variable $4site = 'not yet'; // invalid variable starts with a number $_4site = 'not yet'; // valid variable starts with an underscore کوڈ:
$testvariable = 1 + 1; // Assigns a value of 2. $testvariable = 1 � 1; // Assigns a value of 0. $testvariable = 2 * 2; // Assigns a value of 4. $testvariable = 2 / 2; // Assigns a value of 1. کوڈ:
<?php $a = 5; //we created a variable a and assigned it a value of 5 $b = 2; //we created a variable b and assigned it a value of 2 $c = $a * $b; //we multiplied the varaible a and b then stored the value in c echo $c; //we print the content of variable c which is 10 ?> PHP variables can hold strings, dynamic data. PHP variables are case sensitive $a is not the same as $A کوڈ:
<?php $a = "Welcome to PHP "; //$a holds the string Welcome to PHP $A = 4; //$A holds the value 4 echo "Variable a conatains: $a"; echo "Variable A contains: $A"; echo "$a $A"; //outputs both variables $a and $A ?> |
|
|
|
| مبشر کا شکریہ ادا کیا گیا | جلالپوری (15-10-08) |
|
|
#2 |
|
Administrator
![]() ![]() تاریخ شمولیت: May 2007
عمر: 36
مراسلات: 11,171
کمائي: 167,165
شکریہ: 9,674
7,366 مراسلہ میں 22,057 بارشکریہ ادا کیا گیا
|
سلام!
مبشر بھائی ماءشااللہ بہت اچھا سبق اپ نے لکھا ہے۔ میرے ذہن میں کچھ سوال ہیں ; آپ کہاں پر استعمال کرتے ہیں، بعض جگہوں پر اپ نے لائین کے شروع میں اور بعض دفعہ لائین کے اختتام پر لکھا ہے اور کچھ میں اپ نے اس کو بلکل ہی استعمال نہں کیا ہے۔ والسلام
__________________
تم سپاہی نہیں ہو پیشہ ور قاتلو! |
|
|
|
|
|
#3 |
|
Member
اجنبی
تاریخ شمولیت: Jul 2007
عمر: 27
مراسلات: 75
کمائي: 409
شکریہ: 2
12 مراسلہ میں 28 بارشکریہ ادا کیا گیا
|
بہت شکریہ بھائی.
; یہ سائن Statment terminator کہلاتا ہے. جو کے ہر Statment کے آخر میں استمال ہوتا ہے. |
|
|
|
|
|
#4 |
|
Senior Member
![]() ![]() |
سلام،
مذکورہ دھاگے کو بند کیا جارہا ہے کیوں کہ اس میں گذشتہ ایک مہینے سے کو ئی نیا مراسلہ نہیں ڈالا گیا۔ تما م مراسلے ارسال کرنے والے خواتین و حضرات کا شکریہ۔ وسلام، |
|
|
|
|
|
#5 |
|
Junior Member
اجنبی
تاریخ شمولیت: Jul 2008
مراسلات: 18
کمائي: 130
شکریہ: 0
11 مراسلہ میں 15 بارشکریہ ادا کیا گیا
|
تھوڑا سا میں بھی اضافہ کر دیتا ہوں اس میں۔
Say that we wanted to store the values that we talked about in the above paragraph. How would we go about doing this? We would first want to make a variable name and then set that equal to the value we want. See our example below for the correct way to do this. PHPکوڈ:
Hello! I love using PHP! Echoing variables is very easy. The PHP developers put in some extra work to make the common task of echoing all variables nearly foolproof! No quotations are required, even if the variable does not hold a string. Below is the correct format for echoing a variable. PHPکوڈ:
Hello Sana. My name is: 4a |
|
|
|
| sanishan کا شکریہ ادا کیا گیا | جلالپوری (15-10-08) |
![]() |
| Tags |
| common, computer, data, extra, format, php, بھائی, جواب, حضرات, خواتین |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| موضوع کے اختیارات | |
| ظاہری انداز | Rate This Thread |
|
|
Similar Threads
|
||||
| موضوع | موضوع شروع کیا | فورم | جوابات | آخری مراسلہ |
| Source Code | wajee | ویب سائٹس کا جائزہ | 0 | 25-02-11 11:45 PM |
| Philips Unlocking Code | yashaka | موبائل ریپیرنگ | 2 | 15-01-11 06:46 PM |
| Code Complete 2 | طاھر | پروگرامنگ | 2 | 11-06-09 09:35 PM |
| How To Code? : VB6 | aruz | .Net اور VB پروگرامنگ | 2 | 19-05-09 12:29 AM |
| NEC Unlocking Code | yashaka | موبائل ریپیرنگ | 0 | 24-07-08 10:06 PM |