.
main workshop oper share kar chuka hoon app check karain.Thanks alot bro...I'm waiting
Shakeel bhaie aap ka behad shukria...mai koshesh karoonga k jald az jald aapko Workshop dekha sakoon...
shakeel bhai mujay loveria hoa hay kia karon?
Shkeel BhaiGod bless you
I am Very great Fan of You
I think you are a angel in the shape of Human
You are a god giftted man.
I pray for you You are a You found more devolp in your life
================================
Workshop for the PHP MySQL Class No 10
================================
Ans.1:- Array 2 Qisam k hai 1 Constructive Array jesmai Array k key azhod yar numericaly
assign hoty hai. Jabky dosre type Associative Array is mai ham index ko apne marze k mutabiq
key assign karty hai.
=================================
Ans.2:-
a)Array k shoro mai element(s) ka ezafa karny k lie ARRAY_UNSHIFT() function saykarty
hai.
b) COUNT() or SIZEOF() used for counting elements of an array.
c) IN_ARRAY("Argument", $Array) is used to find out the required value in array.
d) ARRAY_POP($array) Array ka Aakhre element khatam kardeta hai.
=================================
================================
Workshop for the PHP MySQL Class No 10
================================
===========
Question No.3
===========
Ghaltiaan Check karky mujhy zror inform kareen pleasePHP Code:
<?php
//Array that contains all months names short as key and full names as values.
$months = array(
"Jan" => "January",
"Feb" =>"Febuary",
"Mar" =>"March",
"Apr" =>"April",
"May" =>"May",
"Jun" =>"June",
"Jul" => "July",
"Aug" => "August",
"Sep" => "September",
"Oct" => "October",
"Nov" => "November",
"Dec" => "December",
);
foreach($months as $shortname => $fullname) {
//use $shortname for key and $fullname for months full name
print $shortname ." = ". $fullname ." <br />";
}
?>
Last edited by loverahiplus; 3rd February 2009 at 08:53 PM.
===============================
Workshop for the PHP MySQL Class No 10
===============================
==========
Question No. 4
==========
Shakeel bhai check karky mujhy zror inform kareen...PHP Code:
<html>
<head>
<title> PHP MySQL Class 10 Tutorial's Workshop ( I T M a h a l . c o . c c ) </title>
</head>
<body>
<?php
// Array that contains seven days a week and a wrong that is for if the days is not
amonst the weeks day then it will be chosen.
$days = array(
"Wrong" => "<font size=5><p align='right'><b> آپ نے انگلش میں غلط دن کا انتحاب کیا ہے
برائے کرم صحیح دن کا انتحاب کرکے پھر کوشش کریں۔ شکریہ </b></p><i>Sorry you have Chosen a wrong
day. Please chose a correct day and try again. Thankyou</i></font>",
"Sunday" => "<font size=7>اتوار </font> (Etwar)",
"Monday" => "<font size=7>پیر </font> (Peer)",
"Tuesday" => "<font size=7>منگل </font> (Mangal)",
"Wednesday" => "<font size=7>بدھ</font> (Budh)",
"Thursday" => "<font size=7>جمعرات </font> (Jumarat)",
"Friday" => "<font size=7>جمعۃالمبارک</font> (Jummat-ul-Mubarak)",
"Saturday" => "<font size=7>ہفتہ</font> (Hafta)"
);
//Check the data, that is it from correct place or not.
if($_POST['gen']) {
//Creat a function that generate and print out the the given day into Urdu.
function GenerateIntoUrdu() {
//Use the GLOBAL command to call the $day array that is out side the
funcition.
global $days;
$eng = $_POST['eng_to_ur'];
print "<font size=5> $eng</font> = ".$days[$eng]."<br />";
}
GenerateIntoUrdu();
}
?>
<hr />
<form action="php-class10-4.php" method='POST'>
<b>Select Day:</b>
<select name="eng_to_ur">
<option value = "Wrong" selected> ___Select a day___</option>
<option value = "Wrong"></option>
<?php
//Call the array and $array_shift is used to remove the 1st element of the array and write down as
option
array_shift($days);
foreach($days as $eng => $urdu) {
echo "<option value =\"" .$eng. "\">" .$eng."</option>";
}
?>
</select>
<input type="hidden" name ="gen" value ="true" />
<input type="Submit" value ="Translate into Urdu" /></center>
</form>
<hr />
</body>
</html>
Akhre sawal ka jawab bhe jald post karloonga insha Allah....
Aur dosry dosto sy bhe eltemaas hai k please aap bhe check karky mujhy bataieen k s mai kia kharabhe kia achaie hai...
nice & vey very nice
loverahiplus Good work.. Excellent... Well done. App waqee PHP kay dewanay hain or zaroor kamyab hoon gay.
Comments:
Jawab # 1: bikul drust hay well done. yahan sirf Constructive key jaga per numerically indexed arrays ayee ga. baqi jawab app ka theek hay.
Jawab # 2: Correct
Jawab # 3: Bulkul drust well done.
Jawab # 4: yahan app nay program to buhat acha banaya hay likin ya hamaray sawal kay mutabiq nahi hay. agar app sawal ko dobara dakhain to us main likha hay: aik function banaen jo english din ka naam argument kay tor per la kar us ka urdu naam return karay, array ka istemal function kay andar karna hay or function main koee if,else ya switch ka istemal nahi karna. App shayad sawal ko theek tarah say sumjhay nahi hain. app is sawal ko dobara hal karnay ke koshesh karain.
Thanks very much.
Bookmarks