Functions in Php | PHP Tutorial #16

Functions in Php | PHP Tutorial #16

CodeWithHarry

4 года назад

164,035 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@shivsharma3918
@shivsharma3918 - 25.01.2024 14:38

hi , There is Wrong Answer in output of Average marks program
see below :
Correct Average will come out this :
RohanDas Average Marks := 63.333333333333
Harry Avergae Marks = 83.5


Correct code for Average Marks is : -

function avgMarks($marksArr){


$sum = 0;
foreach($marksArr as $value){
$sum += $value;
}
return $sum/count($marksArr);
}

Ответить
@faryadkhattak1533
@faryadkhattak1533 - 04.01.2024 15:19

function check(){
echo "Easy to learn PHP fuction. <br> ";
}
check();

Ответить
@nitinmangtani5072
@nitinmangtani5072 - 06.12.2023 23:01

sir value of "i" should be 0-zero;

Ответить
@Aethersx2Gamer
@Aethersx2Gamer - 14.11.2023 10:07

I am thinking how code with Harry get the output by writing return value 😂

Ответить
@meghanshusaxena1450
@meghanshusaxena1450 - 09.10.2023 08:51

bhaiya mere me parse error de rha hai jahan maine marks ka array ka variable create kiya hai

Ответить
@AHMED-jd6dg
@AHMED-jd6dg - 03.10.2023 17:17

function kam kr kesay raha, ye to bata diya k kya kaam kar raha par ye nae bataya k kesay kam kr raha

Ответить
@shanzayashfaque4604
@shanzayashfaque4604 - 23.08.2023 14:44

not a good Explanation, mjy to kxh smj hi nh aya he bhai detail se bta diya kro jab smja hi rhy ho to itni jaldi kis bat ki he...

Ответить
@simranbains6199
@simranbains6199 - 30.07.2023 10:32

Thank you so mmuch sir

Ответить
@IT_creators
@IT_creators - 18.07.2023 16:39

Average wrong Aya h $i=0 hona chaiye

Ответить
@pfgdanish8852
@pfgdanish8852 - 23.05.2023 14:43

presence of mind harris bhai sum not value

Ответить
@himanshukashyap9496
@himanshukashyap9496 - 11.05.2023 13:01

bilkul sahi se ni btaya fucntions aur bhut kuch chod diya..jaldi jaldi kathm kiya sb

Ответить
@architarya557
@architarya557 - 24.04.2023 12:03

harry bhiya choti c glti kr di aapne $i 0
$syn 0

Ответить
@zubaida3511
@zubaida3511 - 07.03.2023 07:18

Sir i have a question why we write 0 with $sum and 1 with $i

Ответить
@MohiniLakhera
@MohiniLakhera - 01.03.2023 14:50

Please explain code inside function...

Ответить
@dreamerb1
@dreamerb1 - 27.01.2023 06:51

Harry bhai is the best❤❤

Ответить
@himanshuchaprana4495
@himanshuchaprana4495 - 25.01.2023 00:15

bhai last 15 video sahi se samajh ayi but ya upper se chali gayi 🙃

Ответить
@ShivamKumar-ie1je
@ShivamKumar-ie1je - 01.01.2023 11:03

avgMarks me $i ki value zero assign hogi...

function avgMarks($marksArr){
$sum = 0;
$i = 1;
foreach ($marksArr as $value) {
$sum += $value;
$i++;
}
return $sum/$i;
}

$i =0;
hoga...

Ответить
@trendingvideos53
@trendingvideos53 - 02.12.2022 12:31

bhaiya average galat hai

Ответить
@muhammadsaqibhussain3727
@muhammadsaqibhussain3727 - 30.11.2022 22:27

ghanta kuch samajh aya

Ответить
@hemant.latawa
@hemant.latawa - 11.11.2022 11:12

Bhai avgMarks Formula Was Wrong,.. You Result is Showing ---> (Score by Rohan Out of 600 is 54.285714285715 )
But Right Avg is 63.5

I simple add Following Code -----> return ($sum/600)*100;
========================================
instead of $i= 0; return; $i++; $sum/$i;
Harry Ji... Please let me know I am right or wrong.

Ответить
@ArbazKhan-hn1bv
@ArbazKhan-hn1bv - 09.11.2022 19:04

❤️❤️

Ответить
@kashifkhitchi4516
@kashifkhitchi4516 - 26.10.2022 13:19

in your video where you want to calculate average , there should be i = 1, otherwise it will divide sum/ total subject(6) which is 57.95....., , but you write i= 0; due to this formula is sum/(total subject(5)) and answer is 49.9..... plz mention it....

Ответить
@itxxsaiff
@itxxsaiff - 25.10.2022 17:51

Tutorial #16 Done, I was absent for 3 to 4 days 😅 but now present

Ответить
@shashankpandey8346
@shashankpandey8346 - 25.10.2022 15:34

How can we use php functions with html buttons.

Ответить
@arjunkumarkumawat2291
@arjunkumarkumawat2291 - 20.10.2022 16:49

You make a mistake in average formula. But It is ok.

Ответить
@mdsakhawatkhan2905
@mdsakhawatkhan2905 - 10.10.2022 13:34

Your result is wrong bro! The avarage number of rohan das is 63.33. If you give the value of i = 0 ; then its come true result. But i understand the system how to creat a function. Thank you

Ответить
@samuelfrank1369
@samuelfrank1369 - 29.09.2022 16:56

Thanks a lot Bhaiya

Ответить
@muhammadharis8201
@muhammadharis8201 - 22.09.2022 15:21

Return "sum" not "value"

Ответить
@pankajpuri6339
@pankajpuri6339 - 31.08.2022 19:27

Harry sir ek Baar function ko ek Baar phir explain kardo plz

Ответить
@vilakshangupta3200
@vilakshangupta3200 - 19.08.2022 18:48

This PHP Course is Very Helpful!!! 😄😄😁😁

Ответить
@_Ro_HiT
@_Ro_HiT - 10.08.2022 06:59

RohanDas be like...!
Permanent hun sir. ..😅

Ответить
@fareen96
@fareen96 - 01.08.2022 00:02

Sir php function ka use q krte hai ...example btaye sir koi hme lesson plan mai likhna h motivation

Ответить
@mdminhazalam2298
@mdminhazalam2298 - 28.07.2022 04:59

Ye example samjh nahi aaYa 😟

Ответить
@technicalmaster1618
@technicalmaster1618 - 17.07.2022 23:06

This video is helpfull

Ответить
@brainjoy231
@brainjoy231 - 01.07.2022 07:09

this lecture was a bit confusing. harry bhai aapne is video ko explain or step by step nahi bataya hai. esa lag raha tha ki aap kisi ek colleague ko baju me bitha kar use samja rahe ho

Ответить
@deepanshubhardwaj6951
@deepanshubhardwaj6951 - 21.06.2022 11:50

Thankyou sir

Ответить
@rishabhkumawat4514
@rishabhkumawat4514 - 11.06.2022 06:19

Last video m foreach loop m condition check kese hogi aapne toh key variants hta diya
Variable as key => yh condition

Ответить
@princesukhala7106
@princesukhala7106 - 17.05.2022 17:04

Done done again

Ответить
@harshwebdeveloper
@harshwebdeveloper - 10.04.2022 09:15

Thank you so much Harry bhai for all the playlists you made on your channel. You made it very easy for me to learn programming and coding languages like python, java, java script, c, php, html and css. I've learned a lot from your videos and your projects. But if you don't mind, I would like mention a mistake in this video which I found when I was trying this on my own.

Ответить
@abhay_-kv2uq
@abhay_-kv2uq - 02.03.2022 21:27

I think persentage sahi ni hai 😂

Ответить
@ghulammehdisoomro7980
@ghulammehdisoomro7980 - 22.02.2022 19:05

agar mai $i = 1 lie raha ho tu mere number 7 a raha hai aisa hora hai.

Ответить
@ghulammehdisoomro7980
@ghulammehdisoomro7980 - 22.02.2022 19:04

agar mai $i = 1 lie raha ho tu mere number 7 a raha hai aisa hora hai.

Ответить
@ghulammehdisoomro7980
@ghulammehdisoomro7980 - 22.02.2022 19:04

agar mai $i = 1 lie raha ho tu mere number 7 a raha hai aisa hora hai.

Ответить
@ghulammehdisoomro7980
@ghulammehdisoomro7980 - 22.02.2022 19:04

agar mai $i = 1 lie raha ho tu mere number 7 a raha hai aisa hora hai.

Ответить