Building Small Part Of The App With Procedural PHP - Full PHP 8 Tutorial

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

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

  • @oghenevwefepeace2501
    @oghenevwefepeace2501 2 года назад +11

    I could not really do the project on my own. So I had to follow you as you did it. And I learned a lot and feel more confident. Thank you

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Glad to hear that, it's ok that you couldn't get it on your own on the first try.

  • @basilistigris640
    @basilistigris640 Год назад +5

    best teacher in youtube, and the most deep explain of full php with clean and clear code, and for 2023, thank you Program with Gio!

  • @yinonelbaz5309
    @yinonelbaz5309 2 года назад +6

    This series is simply a gold mine! Priceless! And this episode that sums it all up is fucking amazing!!!!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Thank you so much 💙, glad you like it 🙏

  • @bvdizon
    @bvdizon 2 года назад +3

    WoW!!! Took me couple of hours to make sure I understand and that all makes sense. Thank you, Gio!

  • @saidamir6538
    @saidamir6538 2 года назад +4

    First I did this project myself without using file system, just randomly generating all data I needed. Then remaked it following all your steps in this video and googled each moments, functions which I could not understand. Thank you so much, I learned a lot !

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      Excellent, that is the best way to learn, awesome job

  • @josephajibodu2377
    @josephajibodu2377 2 года назад +12

    This whole series is indeed an awesome one. I have well over 5 years experience with PHP, but it feels so good to refresh the memory with the basics and learn some newly introduced features. My target is the advanced section… Especially Unit Test
    Thanks so much Gio 🙏. You’re blessed.

  • @mmelimahlobo7656
    @mmelimahlobo7656 Год назад +8

    Sir you really go into depth when explaining the php syntax and concepts but I think you should also do the same in your projects,try to explain what your code is doing so its easy to follow through because it really gets tricky especially for beginners like us

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      I try to explain everything in depth, is there something that lacked explanation? Can you point me to a timestamp?

    • @heldergoncalves9199
      @heldergoncalves9199 Год назад

      I think what the gentleman is experiencing is the gaps in his own knowledge. The only solution for that @mmelimahlobo7656 is to note down what you don't understand and either go back to one of the videos where that concept is explained, or look it up online and try to put it to practice yourself. Bonus tip: don't worry about messing up, just try and try until it clicks.@@ProgramWithGio

  • @Zubbee
    @Zubbee 2 года назад +2

    I started learning Php almost at the end of February 2022. I even built a small personal site with it but now I see I've been learning it the wrong way. I could barely tell my left from my right attempting this exercise. Had to jump and watch the solution *coveringmyface*. I really need to go over the functions and array tutorials again mehn!. Your solution... I was intimidated (i mean this is a good way). I will press on. I need to sit-up. Thanks a whole lot Gio.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      Don't worry, you got this. Also there are many ways to solve the problem so my solution isn't the only one. It can be done other ways as well that are also right. So I wouldn't worry about it. Just keep practicing. Good luck 🙌

    • @Zubbee
      @Zubbee 2 года назад +1

      @@ProgramWithGio Thanks alot Gio. This is a benchmark moment for me. Discouraged but I need to press on. Thanks a lot for the encouragements, I really need it. I don't think I should move on till I've really understood callback functions, anonymous functions and how arrays work. More grease to your elbow Gio

  • @Azizullah-ce5si
    @Azizullah-ce5si 5 месяцев назад +2

    best and best teacher for PHP specially examples about variables differentiate and data types differentiate, thanks from 2024 from pakistan

  • @lotuslando1994
    @lotuslando1994 Год назад +5

    Your solution was more succinct and elegant than mine 😉 I can see where I need to trim stuff. I used for loops instead of foreach, but I can see how foreach is a much better option in this case. I ended up summing up my totals during each iteration while building the transaction array. I was calling another function to aggregate the totals within the function that was building the transaction array. I was thinking this might be saving time (processing?) if I only looped through it once.
    In the end, I see the value of having a function be more atomic in terms of what it is expected to do. It was kinda turning into the "everything" function. 😆 I will refactor the code more for the next project.
    The reason I am trying to learn PHP is I have to rewrite a Joomla component that has been abandoned. As no one else has created a component with its similar functionality for the latest Joomla release (which uses PHP v8), I've decided that I would be that person. The component uses the MVC pattern, which this latest project in a way is alluding to. Given what I've seen during Section 1, I feel confident that I will be able to do this once I've completed your course.
    I've already put to use what I've learned in the real world thought! 😃I had a bunch of mp3 files, in separate folders, that I needed to display on a page using the HTML5 tag. With what you'd taught to date, I was able to do it without any issues. It really felt like an accomplishment. 🙂
    Otherwise, I would have had to type out all the file paths and titles by hand. Given there were hundreds of MP3 files, being able to use procedural PHP to do this saved me a lot of time.
    As you have likely noticed, I'm basically a n00b when it comes to programming anything. But this course is giving me a lot of confidence, so thank you again! 🙂

    • @ProgramWithGio
      @ProgramWithGio  Год назад +4

      That is really awesome. Great job! Most important thing is you got it working, you can always make it better & clean it up. Love that you are applying what you learned to solve problems, that is amazing and kudos to you.
      You got the right mindset and are doing everything right so I am confident you will build great things. Good luck 🤞

  • @araromirichie4825
    @araromirichie4825 2 года назад +1

    I have watched this over and over and I don't seem to understand it, but I will give it some time, I Know I will grab a hold of it soon. Thank you Gio, you are a wonderful teacher and person

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Don't worry about it. Take it slow and take a break. Thank you and good luck. If you have specific questions feel free to ask me either here or message me on Twitter

  • @josephnduati1214
    @josephnduati1214 Год назад +1

    ...and still the best PHP tutorial for experienced programmers. The parts that I enjoyed most: i) the callable function as a parameter hence making the code more reusable/universal, ii) Enforcing of strict type and type hinting, iii) array destructuring
    The tutorial playlist is great, may be a bit challenging for new programmers e.g the intuitive feeling that a certain function should be a helper function other than a business logic function.
    All in all, this is great, many thanks.

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Thank you 💙💙. Intuitive feeling about certain functions is not expected, this is just my version of the solution but I think as long as beginner implements a working solution for this exercise regardless of what it looks like, I would say it's a success.

    • @josephnduati1214
      @josephnduati1214 Год назад

      @@ProgramWithGio Indeed, thanks 👍🏿

  • @cristianvulpe1408
    @cristianvulpe1408 3 года назад +11

    Gio, thank you so much for this video! Great series until now. Looking forward to your next series.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      Thank you. Will start publishing new videos soon. They will be part of this series too 👍

  • @alexm3369
    @alexm3369 2 года назад +2

    As someone who is classified as a beginner in Programming, for me this is already too advanced. Until now, I have watched 31 videos and while I understood most of the concepts, I never really got to use anything until now. With this being the first project, I couldn't even know where to start. Within the first 2 min of the video I knew right away this is way over my head and I never stood a chance. I do enjoy how Gio teaches in these videos but unfortunately I am going to be searching for a more beginner friendly course with more exercises along the way. Maybe one day when I am intermediate or advanced I can revisit this series. Good luck to everyone on the PHP learning journey!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      Hey, that's normal. Everyone learns at different pace & different ways. I completely understand. Good luck on your journey, feel free to reach out with any questions 🙌.
      Thank you for the feedback 💙

    • @samduss4193
      @samduss4193 Год назад +2

      I would recommend CodeAcademy, you got some solid basic there.. and to be honest All tutorial online are repeating over and over the same.
      Come back here After.. cause GIo is for me the only tutorial I ran into that deliver an incredible amount of great infos. you wont find anywhere else.
      but you will struggle a bit at first but need time to digest go over and write some notes.. :)
      the project I failed to make it fully but i got some stuff running. I went into his detailed correction and search for explanation on it :) and i nail the logical.
      my code is Messy and i need to google for funtionalities but i guess coder are all like that lol..
      repetition and patient will make us the Masters :) ... Thanks again Gio :)

  • @TheNation2013
    @TheNation2013 2 месяца назад

    Working with PHP for quite some time ................. haven't seen such a great course ............... kudos and thank you so much !!

  • @danish9906
    @danish9906 9 месяцев назад

    tada finally done few days ago i completed all the prev 30 videos and jumped on the project at that time i felt it was over for me i couldn't understand even a single line but then i started again from the tutorial 1 and this time investing a lot of time on every single video , a lot of time and now this project not i completed myself but after watching the solution to it i learned a lot of new stuff and everything seems so perfect ...thankk youuuu so much

  • @swamsaung8155
    @swamsaung8155 2 года назад +1

    I wrote that program result in same output but your code is well organized, meaningful function name, extendable really nice. i think that is the difference between junior and senior developer , i get many knowledge how to write good program only in single video. really high quality lesson sir. sorry for my english expression.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      And that is perfectly normal, also everyone has different style. You'll get better at it with practice. Thank you & glad you did the exercise, good job 💙

  • @ZeppGoesPro
    @ZeppGoesPro 2 года назад

    I did it my own way before watching this video! My code is ofcourse has terrible quality, ofcourse I googled a lot, but it my first steps in programing. I didn't know anything about php and html before. Only one flow - i can't make horizontal dividing lines, other stuff (such as color change, calculation, output with "$" and "-$", date format and so on) is working. Thank you so much master Gio! Now time to watch how experienced programmer do the task and learn from it, moving forward the course. God bless you and all you love!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      That's awesome, great job & don't worry about the quality for now, the important thing is to keep trying & keep practicing. Good luck & thank you

    • @ZeppGoesPro
      @ZeppGoesPro 2 года назад

      @@ProgramWithGio i didn't get how the comma returns after formatDollarAmount function, i understand how '-' and '$' returns, but not the comma =))

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@ZeppGoesPro That's part of number_format function, www.php.net/number_format

    • @ZeppGoesPro
      @ZeppGoesPro 2 года назад

      @@ProgramWithGio got it! Thx!

  • @mehmetaydar_QXyGeN
    @mehmetaydar_QXyGeN Год назад +2

    Wow Teacher. This lesson is so excellent. I learned a lot from you, and I continue to learn. Thanks so for all ❤🙏👑

  • @chenting71
    @chenting71 2 года назад +1

    learnt more than just code, but good habit of organising and structuring program. Thank you very much.

  • @Zubbee
    @Zubbee 2 года назад +1

    Okay so I tracked back and went over some of the videos again especially the arrays, working with arrays and the callback functions and anonymous functions etc. I understand it a lot more now. I'll move on in the course. Thanks a lot Gio

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      That's the right way to learn, great job. Thank you 💙

  • @robeeeeen
    @robeeeeen 2 года назад

    If someone can follow this free courses from Gio, Technical interview will never hard for him.

  • @zikobht4623
    @zikobht4623 2 года назад

    Even if I didn't understand everything ,Thank you so much. I have been struggling with php for over a month to find some resources until I found this channel.
    I will try to finish the playlist before 2022.
    I wish you a happy new year.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Thank you 💙💙. Feel free to ask questions if something was confusing, I'll be happy to clarify & clear things up. Don't rush, take your time. Thanks again and I wish you a happy new year as well 🎄

  • @matthewlee-mu2kq
    @matthewlee-mu2kq 5 месяцев назад +1

    Thank you Gio. I've learnt so much in a single video 👍

  • @peterpardo4138
    @peterpardo4138 2 года назад +1

    Wow! Again with another high quality lesson! I really appreciate you Gio

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Thank you, and I appreciate you 🙌💙

  • @Armando-px8hi
    @Armando-px8hi Год назад

    Simply No words for you,GENIUS! It was a little bit hard but I have done it.Thank you!

  • @deepakraj436
    @deepakraj436 2 года назад +1

    The best way to learn PHP🙏 Thanks for such a great content

  • @janedawg09
    @janedawg09 10 месяцев назад

    the project's instructions were too ambiguous for me especially instructions 2 & 3, but after watching this, I understand it now. this was short but such an informative video. the explanation would require me to watch it a couple of times before I get the hang of it and finally do it on my own. but still, glad I finally finished the first part

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад

      Congrats on finishing the first section, great job

  • @WhiteSiroi
    @WhiteSiroi 2 года назад +2

    loved the whole playlist, thank you very much, subscribed

  • @mostafamahfouz1139
    @mostafamahfouz1139 3 года назад +4

    Gio , thank you so much for this series

  • @Ruhiguzeladam
    @Ruhiguzeladam Год назад

    Well some how i manage to complete first part of the course and i can say that the course is very beginner friendly. Thank you Gio you are great.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Great to hear, you're welcome & hope you enjoy the rest of the series too

  • @nawidullahamin9145
    @nawidullahamin9145 20 дней назад

    I love the way you teach and really appreciate your efforts. I have followed all lessons and learned too much as a beginner. Everything is great and well-structured, but for this project which is the practical one, it would have been better if you had started everything from scratch without prepared files and folders.
    Because for beginners like me, it is so difficult to follow along and understand everything with the premade folders and files, especially the connection between these files. Thank you very much.

    • @ProgramWithGio
      @ProgramWithGio  20 дней назад +1

      Appreciate the feedback. Did you watch the series from the beginning? We covered pretty much all of the setup in previous episodes

    • @nawidullahamin9145
      @nawidullahamin9145 19 дней назад

      @@ProgramWithGio Thank you very much. Actually, today I read the file called README and most of my concerns (problems) are solved now. Thank you for the nice and complete guidance there in the mentioned file.

    • @nawidullahamin9145
      @nawidullahamin9145 17 дней назад

      ​@@ProgramWithGio Thank you very much. Yes, I have recently started learning PHP and I am strictly following all these episodes. ABOUT MY PROBLEM: In fact, after studying the README file, my problems were resolved, because everything was explained very well and perfect.

  • @Silent_tuts
    @Silent_tuts Месяц назад

    I hope you’re doing well! I really enjoy your content, especially the PHP & Laravel series.
    I believe a series on WordPress core development, focusing on plugins and theme development, would be incredibly valuable. Your expertise would provide great insights for many of us looking to enhance our skills.

    • @ProgramWithGio
      @ProgramWithGio  Месяц назад

      Thank you. I dont work with WordPress so probably would not be a good quality series

  • @JavaliP
    @JavaliP 7 месяцев назад

    I'm so happy that I could finish the project alone, without wiewing the answer! My code works, but is kinda "bloated". I've got a lot to improve, anyway, thanks for the course, it is much better than a lot of paid ones. :)

    • @ProgramWithGio
      @ProgramWithGio  6 месяцев назад +1

      That's awesome, it does not matter if its bloated or not, as long as it works. You can improve it & get better little by little

  • @aleksandrkanygin2672
    @aleksandrkanygin2672 3 года назад +1

    It's so nice to find that my initial soluition for the exercise was somewhat close to what you've done in this video, except it was not so flexible and i formatted dates and amounts right in the view file which looked messy. You're a great teacher Gio. Btw i think for multiple files we need some way of sorting the final transactions array by date.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Glad to hear that. Thank you 🙌. Sorting can be extra credit 🙂, you can try adding it, if you come across questions or need help send me a message

    • @aleksandrkanygin2672
      @aleksandrkanygin2672 3 года назад

      @@ProgramWithGio i used usort built in function passing my sort function in it, i guess it's ok

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      @@aleksandrkanygin2672 yup that works

  • @goldfix8112
    @goldfix8112 2 месяца назад

    Was good for first ever coding experience, done myself 2/3 of this app. My code, of course, VERY ugly and cant process some steps from your guide(i stuck on 'reading all files from directory' feature), and formatting done by me was too dummy, but i really glad to have this experience, doing by myself as many as possible on this step of learning, tries to less use google and etc., seems a good way. After watching this video, solution from sensei, gonna rewrite my code and get close to right realization. Thanks a lot, Gio!

    • @ProgramWithGio
      @ProgramWithGio  2 месяца назад

      Happy to hear this, glad you did the exercise

  • @armirpajaziti4067
    @armirpajaziti4067 Год назад

    Wow Amazing Gio, thank you so much for this video! 🥰

  • @hopeofglory8108
    @hopeofglory8108 2 года назад +2

    Gio, that was a really high quality exercise, I am impressed! Helped me to put into practice some of the concepts from previous videos that I had been less familiar with. Huge thumbs up. I haven't touched getting files in over a decade probably, and had always struggled with callback/anonymous functions. So I practiced with array_filter to get all positive values to sum, and all negative values to sum (for the totals). I also used array_map and array_column to strip all the currency symbols in one go, but did revise it after watching your solution as parsing the data at the point of reading does make more sense.
    Maybe an improvement to doing separate functions for different banks would be to parse the headings row ;) Some banks may return way more columns than needed, for example, or switch up how they send their statements.
    Learnt a lot from working on the exercise, plus from comparing it to your solution. Thanks!

    • @hopeofglory8108
      @hopeofglory8108 2 года назад +1

      Oh, and I added a 'credit_debit' key to my data array and use that to set a class on the amount cell :)

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      That's amazing. That's the best way to learn & improve. I'm super happy that you gave exercise a try & enjoyed it. Thank you so much 💙💙

  • @omaryahia
    @omaryahia Год назад +2

    Your playlist is really really good
    simple, compact , useful
    thank you 🌟✨

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Thank you 💙

    • @senpai2314
      @senpai2314 Год назад

      @@ProgramWithGio could you make a short game tutorial please

  • @samahgad241
    @samahgad241 Год назад

    Thanks, a lot Gio, I am coming from learning javascript and was a little afraid of learning PHP, but your way of explanation is fantastic.🌹🌷

  • @sym2574
    @sym2574 Год назад

    This is the greatest php project for beginners 🤩

  • @ChristianHaugland74
    @ChristianHaugland74 3 года назад +5

    Thank you for a great tutorial.

  • @jeevachaithanyansivanandan
    @jeevachaithanyansivanandan 3 года назад +3

    Very informative, shared now

  • @Vitalii-m6r
    @Vitalii-m6r Год назад

    Practice makes perfect! Thanks again for this PHP series~

  • @udayan285
    @udayan285 Год назад +1

    This course is very helpful to me. Thanks

  • @romancampbell3995
    @romancampbell3995 2 года назад +1

    I struggle in figuring out the best way to learn. I've been programming for a little while now in college and it still seems like I know nothing. I had to watch some of your solutions to this when I couldn't figure it out. Is this the best way to learn? Following a tutorial and coding along with the instructor? I drive myself crazy trying to figure out how to become proficient. Good thing is I understand it once I see it, but that's the problem, I feel like I need to see it first. Great class so far though.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Yes that is the best way to learn, watch tutorials & code along. Its perfectly normal in the beginning to not know what to do and understand it after you've seen it. It comes with practice, the more you practice the more you'll know what to do in future. You got this 💪

  • @joanna_ska
    @joanna_ska 2 года назад

    Thank you so much for this tutorial Gio! You've done absolutely awesome job! Even if, I'm not totally convinced by php (maybe just not yet? 😉), I really appreciate your effort.
    It's not easy for me to get the feel of php but I have tried to play with it a bit and this is what I came out with in terms of colouring the transaction amount without if's:

  • @adelhishem1
    @adelhishem1 Год назад

    Great video, loved your solution Gio!

  • @MaziarHeidari-i4e
    @MaziarHeidari-i4e Год назад +1

    In 3:50 , when you changed the getTransactionFiles function in a way that it gets inputs, there is a difference. Before the output was just the name bur now the output us the full address . I don't get it why

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      We are passing the path as an argument & are prepending it to the file so that way the file is a full path & not just a filename. Before it was just a filename because we were hardcoding the FILES_PATH constant but now it can be different.

  • @ahmedmahdy6676
    @ahmedmahdy6676 2 года назад +2

    Why typing
    fgetcsv($file); ignored the header? Does the function itself discard the headers of csv files?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      fgetcsv just gets the row from the file. If you don't assign it to anything then it just is discarded.

  • @tautvydaskarvelis5872
    @tautvydaskarvelis5872 2 года назад +1

    Thank you very much for this course! I am really amazed how professionally this course is done! However, I would like to ask about the float numbers in the solution of the exercise. You've mentioned in one of your videos before that while working with the float numbers, you have to be very carefully due to their precision issues. So, in this exercise, wouldn't it better to multiply each amount by 100, do calculations (an addition or extraction) and before displaying the final numbers, divide them by 100?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +4

      Thank you 💙. In general I would agree, handling monetary values with float type can be dangerous. Better to use objects to represent Money & strings with bcmath. Since this is first section & beginner friendly I didn't want to overwhelm/confuse anyone by using objects & bcmath since objects is part of 2nd section.

  • @mahdia7625
    @mahdia7625 6 месяцев назад

    Thank you for this valuable course❤

  • @miftaudeenabdullahi6856
    @miftaudeenabdullahi6856 2 года назад

    Nice to find this great course and thoroughly enjoying it so far and want to thank you for your efforts. Job well done sir.
    but I didn't understand some part in this video (Building Small Part Of The App With Procedural PHP - Full PHP 8 Tutorial)
    i will be glad if i can get some explanation on it

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Thank you. Sure thing you can message me on Twitter or hop on discord

    • @miftaudeenabdullahi6856
      @miftaudeenabdullahi6856 2 года назад

      @@ProgramWithGio I already message you on twiiter

  • @akpewlfried2123
    @akpewlfried2123 2 года назад +1

    Thanks a lot Gio . Please can we get a series on pure php projects like this one.
    Thanks.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      We'll work on a project at the end, it will be mainly vanilla but will use composer & bunch of packages to build the app

  • @Nick-gz7ph
    @Nick-gz7ph Год назад +1

    Thank you so much!!! Your decision so briliant looks perfect Its motivate me to try code cleaner

  • @mmelimahlobo7656
    @mmelimahlobo7656 Год назад

    Sir would you kindly explain what you just did there when defining your constants,I am a bit puzzled by the concatenation you made on the values of the constants,what does the directory separator achieve?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Can you point me to a specific timestamp? If you are talking about the directory separator constant that just basically adds proper "/" regardless of on which OS it is used on. Technically, you don't even need to use that constant, you can just use "/" and will still work in most if not all cases

  • @twentxx
    @twentxx 2 года назад

    Thank you very much!
    Wanna see more functional style tutorials 🙂

  • @christiansosa5484
    @christiansosa5484 Год назад

    Amazing work man!

  • @ExequtionTV
    @ExequtionTV Год назад

    I have some questions:
    1. Was there video on your channel about callbacks in first part of course? (I didn't understand this fragment in 12:15 where you used ?callable)
    2. Was there video on your channel about "handlers" in php, for what they are etc.? I often hear this term, but I don't know what it means exactly.
    2. What this "?" (question mark) which I asked about in first question means? Right before "callable".
    3. In about 12:39 - You assigned "$transaction" which is read row of CSV to "$transactionHandler($transaction);", it's line 35 at that moment of video. And right under, there is an assignment to "$transactions[]" array. My question is: Do we have to do it like this? I mean, in my code in pleace of your line 35 I just assigned my $transactions[] array straight to $transactionHandler($transaction). It looks like this: "$transactions[] = $transactionHandler($transaction);". With it I have one line less of code, but I wonder if it can be a mistake? That's why you didn't do it like that in your video.
    At the end sorry for my English if there are mistakes. I'm not fluent speaker.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      1. Yes we did, check the outline repo (link in description) or the playlist and you should be able to search and find the video
      2. This is used interchangeably for different purposes. Handler is something that handles/performs a task or a job. Error handler is something that handles errors, exception handler is something that handles exceptions & so on. Transaction handler in the context of this video simply handles the data extraction from transaction row
      3. Transactionhandler can be null, thats why we first check if its null or not, if its not null we call it & then add to array, if its null we just add the transaction record to the array

  • @ahmadyounis6814
    @ahmadyounis6814 10 месяцев назад

    thank you for this unique course.

  • @DAG_r8
    @DAG_r8 2 года назад

    using callables is awesome thank you for this. 2 quick questions : 7:12 is a second foreach bad practice to avoid using the keys ? 8:30 array_combine using keys from first row VS array deconstruction ?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Nope not a bad practice, it's just you don't always know the size of inner array, it may also be associative arrays with string keys.
      About array combine, not sure I understand, what would you be combining can you show me an example? There are many ways to do things as long as it works 🙂

    • @DAG_r8
      @DAG_r8 2 года назад

      ​@@ProgramWithGio when parsing the csv : I used array_combine using the first row of the csv for each line, and sent that array to extractTransaction and used 'Amount' as key for the str_replace. (when parsing csv I like to use associative array using the column name when possible) It works but seeing all I already learned in the basic part of this tutorial ( first time I see array deconstruction ) I wanted to make sure what is best practice. thank you again,

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@DAG_r8 either way works. There is no right or wrong in this case. One thing I would note is that you are relying on the column names which can change and can cause errors later. That's why I explicitly define the keys

  • @umairsaeed5925
    @umairsaeed5925 8 месяцев назад

    wow learnt many things I have completed this task but not this way this way is more felxible

    • @ProgramWithGio
      @ProgramWithGio  8 месяцев назад

      There can be many solutions to a problem. Good job on completing it

    • @umairsaeed5925
      @umairsaeed5925 8 месяцев назад

      @@ProgramWithGio waiting for playlist on Laravel since one year😀

    • @ProgramWithGio
      @ProgramWithGio  8 месяцев назад

      I took a long break from content due to few reasons including personal & work. Will get back on track soon

    • @umairsaeed5925
      @umairsaeed5925 8 месяцев назад

      @@ProgramWithGio looking forward for it

  • @vramosjd
    @vramosjd Год назад

    Hello Gio, great tutorial so far, can you further explain how does the code on 6:30 removes the first line/row of csv?

    • @ProgramWithGio
      @ProgramWithGio  Год назад +2

      Thank you. It simply reads the first line and moves pointer to next line.

  • @FatosDaNaturezaOficial
    @FatosDaNaturezaOficial Год назад

    31 videos so far, and it's enjoyable how you teach, can you make a tutorial on how to make a cms with php using class please, it would be Wonderful?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Thank you. We build a project at the end of this series, second section is all about OOP, third is advanced stuff and final section is the project.

  • @ranakpik
    @ranakpik Год назад

    Hi Gio,
    Thank you for the excellent tutorial. I am currently learning PHP and have covered all the basic topics such as Array methods, functions, loops, and variables. However, I am still finding it difficult to understand the implementation of projects. Can you provide any suggestions or tips that can help me better understand the project?

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Hey, it's normal, everyone learns different ways so don't worry about it. I would say do more practice, even if you don't understand it. Working on a project will help you understand things, if you don't understand something research that specific topic, read documentation, then go back to your project & continue. Best way to learn is by building things.

    • @ranakpik
      @ranakpik Год назад

      Thank you so much for your suggestions 🙏

  • @sym2574
    @sym2574 Год назад

    please teacher , Can you answer me about this question >> in the view / transactions file , how did the php code take the data from sample.csv file without writing any line or sentence that point to HTML file to take the data from Excel file ?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      In this solution we are not taking the file from HTML, we are reading a local directory and getting the CSV file from there. File uploads are covered in second section

  • @MaziarHeidari-i4e
    @MaziarHeidari-i4e Год назад

    In line 31 in 5:20 , I don't get the while loop condition . Why don't you write fgetcsv($file) !== false
    ?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      We are assigning the result to variable $line first and also checking if it's not false.

  • @asmotovlogs228
    @asmotovlogs228 Год назад

    This series is like a goldmine. I did complete the Simple Calculations project twice. I can't do the project without watching the video once in a while. Now in this situation will it be ok to watch the second section tutorial?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Yes and that is normal, don't worry about it 👍

  • @josephjohn4810
    @josephjohn4810 2 года назад +1

    can someone explain to me how fgetcsv($file) ignores and discards the first line of code in the .csv file?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      fgetcsv returns the row from csv & moves pointer to the next row, we are calling fgetcsv and are not assigning to a variable & not doing anything with it so essentially it just gets discarded & pointer is still moved to the next row.

    • @josephjohn4810
      @josephjohn4810 2 года назад

      @@ProgramWithGio thanks for you immediate reply, i really appreciate your effort in giving us this package for free. thanks once more

  • @ollienicholson
    @ollienicholson 5 месяцев назад

    When I get hired I'm going to send you some cash - invaluable sir!!

    • @ProgramWithGio
      @ProgramWithGio  4 месяца назад

      I appreciate it, thank you. Getting hired after watching my course would be the best gift for me

  • @candlemaker
    @candlemaker 9 месяцев назад

    These are great videos, thank you! Where are the files needed for this project? Like the CSVs etc?

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад +1

      Repository, link in description

    • @candlemaker
      @candlemaker 9 месяцев назад

      Thank you!@@ProgramWithGio

  • @CharlesPlaysIQ
    @CharlesPlaysIQ Год назад +1

    my head spinning😵‍💫

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Take a break & come back to it. Feel free to ask questions if you are stuck on something or if something doesn't make sense. Happy to help

  • @MaziarHeidari-i4e
    @MaziarHeidari-i4e Год назад

    Could you please explain what exactly is happenning in line 10 to 18 in app.php? I mean the foreach loop , the time 3:25

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Scans the directory for files & adds each file to the array which then gets returned. Notice that it skips any sub directories, thats what the if conditional check does.

  • @sam34889
    @sam34889 7 месяцев назад

    is there a problem with passing a string arguement when the parameter is defined to be a callable? php keeps given me this error

    • @ProgramWithGio
      @ProgramWithGio  6 месяцев назад

      Do you have a function defined with that name?

    • @sam34889
      @sam34889 6 месяцев назад

      @@ProgramWithGio yes i think it is a problem with the imports and files location i am working on it.

  • @journeytocoding816
    @journeytocoding816 2 года назад

    Hello Gio,
    first time in my life i did file handling. I have one question in the code for calculating Totals
    function calcTotal(array $records):array {
    $totals = [
    'total_income'=>0,
    'total_expence'=>0,
    'net_total'=>0
    ];
    foreach ($records as $record) {
    $totals['net_total'] += $record['amount'];
    // This line is adding and subtracting the values as the loops run till end right???????

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Hello 👋. That is correct

    • @journeytocoding816
      @journeytocoding816 2 года назад

      @@ProgramWithGio Hello 👋 Gio. Thank you. I also tried with array_sum but it is taking more steps. Your method is more short.

  • @yooo4201
    @yooo4201 2 года назад +1

    after executing the first function getTransactionFiles( ) i got his output Warning: Undefined variable $files in C:\xampp\htdocs\SB_ET\mini_php_proj_gio\public\index.php on line 16
    NULL,
    can anyone help

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Error message is saying that files variable isn't defined at line 16. So check line 16, maybe typo or files simply not defined

  • @gedasgedas1720
    @gedasgedas1720 3 года назад

    Why are you writing your first letter uppercase in "App.php"? Is there a difference in using for example $variableOne and $variable_one. Which one is more preferred?

    • @gedasgedas1720
      @gedasgedas1720 3 года назад

      And you are using syntax to print variables without echo. Is there any downside of using this instead of

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      It's simply a convention/standards, its up to you which one you want to follow. There is a lesson about PSR standards & conventions in second section of the course which can help answer these. I also prefer the short echo statement , less code to write & semicolon is not necessary if its the only statement there so its just my personal preference

  • @sym2574
    @sym2574 Год назад

    teacher may I ask you ,,Why didn't we check if the directory is exist or not in getTransactionFiles function ?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      I think in that case it should just return empty array because scandir will probably return false, but good point, its always better to be safe & check if directory exists or not.

  • @alexb.1423
    @alexb.1423 9 месяцев назад

    Thanks a lot for the whole course. At all I understand most of the things, but in this lesson the things happened too fast for me and I'm confused. Probably the problem is in me and I'm too dumb for that :D Anyway thanks again, it's a lot of work to prepare this course!

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад +1

      You are not dumb. Lessons get harder as you continue. It takes me sometimes 2-3 rounds to understand something new myself so its totally normal. When I get stuck I usually take a break or do something else, then come back & do research with fresh mind

  • @ast453000
    @ast453000 2 года назад

    Can you explain the parameter: ?callable $transactionHandler = null ? I understand that ?callable means it's "nullable", but isn't the default parameter already set to null? I'm confused. Can you point to where you covered this in the previous videos? Thanks.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      When setting default value to null yes that makes parameter nullable, I just prefer to mark type as nullable anyways. Either way is perfectly fine. I personally like to keep it to stay consistent. You can read more about it in the RFC: wiki.php.net/rfc/nullable_types

  • @MrViper5822
    @MrViper5822 Год назад +1

    If I could make a teaching suggestion. You have a tendency to "jump around" while working, which does not provide a smooth learning experience. I feel like the overall experience of the course would drastically improve if you just slowed down a little between transitions. I don't want to sound too critical, it's a free RUclips course after all. The content here is thorough and it is an excellent resource for someone coming to learn PHP as an extra language - but if someone is not experienced in programming, I worry that they would be confused trying to follow the logic. Take a breath between sections.

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Thank you for the feedback. I completely agree with you and is a good feedback. The speed improves later in course as I improved on it. Main issue with the earlier videos was that I edited too much out, I removed all empty spaces, so it seems like I don't breathe. This was mistake I tried to fix later on in the course and also slow down a bit.
      Thanks again for the feedback 🙌

  • @David-ok9vt
    @David-ok9vt 2 года назад

    Does anybody know of any resources where people discuss how to learn to approach problems in PHP? This is a wonderful project/lesson but I struggled to know where to begin and apply what i'd learnt previously : (

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Any specific issues you are having with this exercise? Ping me on Twitter & I can help answer some questions. I would suggest checking out Laracasts PHP course which is free & is more beginner oriented, so it might help you. You can come back to this afterwards.

  • @mhballa5866
    @mhballa5866 5 месяцев назад

    First, thank you very much Gio for the Excellent , Excellent tutorials, I cant talk enough about your ability to teach. would love to see you do tutorials on other programming languages like javascript.
    Second, I notice in the function getTransactions() you open the file but didn't close it by fclose()
    in here it does seem to not matter, but in building a production website will this cause error down the road?.

    • @mhballa5866
      @mhballa5866 5 месяцев назад

      another thing, i notice that in extractTransaction(), when you assign the variable $transactionRow,
      it did not work, as in : $transactionRow = [$date , $checkNumber ..]
      only the way you write it : [$date , $checkNumber .. ] = $transactionRow; work
      why is that?

    • @mhballa5866
      @mhballa5866 5 месяцев назад

      one last things, sorry ;)
      the getTransactions() after you add the callable parameter, why do you need the if statement, and why it is null be default?
      can it be used without the need of extractTransaction() like functions? what other uses for the function getTransaction() without passing callable function?
      i tried deleting the if statement and the removed the null and it worked. but is this mean there are other functionality that are lost?
      sorry again, for the multiple questions, but your video is very good for learning and make you think.

    • @mhballa5866
      @mhballa5866 5 месяцев назад

      really, this time is the last one.
      do you have ideas for procedural projects like this one. in order to drill the information.

    • @ProgramWithGio
      @ProgramWithGio  4 месяца назад

      Hey, sorry for late reply.
      1. Its good practice to call fclose(), I probably forgot here. It will automatically close when php script ends but ideally you would close it yourself once you are done using it.
      2. Its called array destructuring, thats the correct syntax for it. $transactionRow = [$date , $checkNumber ..]

  • @thuriyayenaing7571
    @thuriyayenaing7571 Год назад

    Sir why do we use arrays as parameters in getTransactionFiles and getTransaction ? I tried working with the string and it works as well .When I try working the arrays as arguments , things don't really wrap around my head like why do we need to use it in the first place .Thank you for your lessons sir.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Not sure what you mean, the method parameters are strings not arrays, function getTransactionFiles(string $dirPath): array here the dirPath is string, not an array. Array is the return type

  • @dusko8989
    @dusko8989 2 года назад

    Hello again Gio
    Do you think if we watch all your 100 videos from begginer to advanced part and really understand it after couple of months or year , can we apply for some beginner job positions as juniors?
    Thanks

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +3

      Hello. Yes I think so, why not? By the end of this series you should have enough knowledge to be able to build stuff & be able to understand frameworks better & start using them. Just make sure to do the final project that we'll start working on soon.

  • @shinpaingmin603
    @shinpaingmin603 Год назад

    Sir, I want to ask you something. We can normally include file by writing " include '../app/App.php' ". Is there any reason why you used build-in methods?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Do you mean include()? There is no reason, just an old habit that sometimes kicks in. I do tend to use include '...' though more often

    • @shinpaingmin603
      @shinpaingmin603 Год назад

      @@ProgramWithGio No, sir. You used functions such as scandir, dirname to scan the directory and then filtered to get files only like transaction file. Can we just directly access the transaction file without using the above methods? I think we can write the file path, store it in a variable and output all the lines. I might be wrong but I want to see the difference. Thanks for giving me your time, Sir!

    • @shinpaingmin603
      @shinpaingmin603 Год назад

      I mean we usually navigate the file path in cmd or link the css file in one line using './css/style.css' or 'cd ../../app/' something like that. Can we just use that way to get the file path without using build-in methods. If yes, what will be the pros and cons.

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      @@shinpaingmin603 include will evaluate the file, we just need the content of it, also this way we can load multiple files

  • @lahcenaouina
    @lahcenaouina Год назад

    Hi Why we define paths we can just use require "./name.php" Someone explain please ?

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      That's assuming name.php is in the same directory as your current file. Otherwise u will have to go up directories & specify directories in path. Having paths defined avoids that part

    • @lahcenaouina
      @lahcenaouina Год назад

      @@ProgramWithGio Thank you so much

  • @sym2574
    @sym2574 Год назад

    great teacher but why did you use two arrays to read from the csv file in index file whereas we can just use one array to read lines from csv file by the function ''getTransactions'' without need to ''array_merge'' ?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Because there might be more than one csv files and array merge merges transactions from all files

    • @sym2574
      @sym2574 Год назад

      @@ProgramWithGio teacher .. I have more than one csv files , and the program works fine , whereas I did not use array merge
      I just wrote like this
      $transactions=[ ];
      foreach($files as $file)
      {
      $transactions[ ] = getTransactions($file);
      }

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      @@sym2574 then your outer loop that loops over transactions is different, you are creating array of arrays there where with array merge it's just one array. So you probably have double loop somewhere. If you share your code in GitHub I'll take a look

    • @sym2574
      @sym2574 Год назад

      @@ProgramWithGio okay teacher ,, thank you a lot

  • @vanthaitran159
    @vanthaitran159 2 года назад

    I can not read the $transactions variable within transactions.php although I did require the file path of transactions.php. Please help mee, thanks so much!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Make sure you are including the file properly. If you show me your code I can help you find the issue. You can DM me on twitter and send me a screenshot if you want.
      Check 6:50 thats where transactions.php is included

  • @mayatundeolawale3
    @mayatundeolawale3 2 года назад

    I'm just starting php and this tutorial is great but Gio can you please slow down a bit you are kinda too fast 😄😄😄...God bless you...This project looks like rockets science course to me 😀😀😀

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      Thank you 🙌. I improved on that in the latest videos, for the older ones you can slow it down via RUclips, you can adjust the playback speed. Sorry about that.

  • @josephjohn4810
    @josephjohn4810 2 года назад

    Hi, i've been getting array to string conversion error in my views while trying to display array items without destructuring my array (i.e using transaction[0]). i've checked my code and everything is fine. i don't know if it has something to do with my php version, i'm using php 8.0

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      There is a nested array, check in the video, I have inner loop if the item is array.

    • @josephjohn4810
      @josephjohn4810 2 года назад

      @@ProgramWithGio thanks i've seen the issue, i used $transaction [] to insert items instead of array_merge(). please can i know the difference between the two? why should i use array_merge instead of inserting directly using $transaction [] = getTrransactions($file);

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@josephjohn4810 [] appends a new element, array_merge merges arrays. If you try to add array as element using [] then you are not merging but adding that array as another element giving you a nested array. Use array merge when u want to merge arrays

    • @josephjohn4810
      @josephjohn4810 2 года назад

      @@ProgramWithGio noted, thanks 🙂

  • @s4f4y4t9
    @s4f4y4t9 3 года назад +2

    Why others video privated

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Some videos are just scheduled to be released within few days

  • @themetracktor9574
    @themetracktor9574 3 года назад +1

    Thank you for the explanation, I am such a noob I am dissapointed :(

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +5

      You're welcome and don't worry if this was a bit confusing and don't feel disappointed. I've been there & I've felt the same way before. We all start somewhere, I remember the days when I was starting out & how frustrating it was. My advice is to not worry about it & just take your time and improve one step at a time.
      Also, note that the way I implemented this is not the only way and is not the "best" way either, there are better ways of doing this especially once we move on to the OOP section of the course. Remember that there are many different solutions to a problem.
      If you have any questions or if something did not make sense let me know & I can help you

    • @themetracktor9574
      @themetracktor9574 3 года назад +1

      @@ProgramWithGio Thank you very much for the support and the kind words, God bless you, we need more good people like you in this world!! I am following your tutorials and I am very grateful, I will take your advice into consideration, looking forward to the OOP way.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      @@themetracktor9574 You're welcome & thank you. If you have any questions down the road you can message me on Twitter or comment on videos, I'll be happy to help with what I can. Good luck 🙌

  • @jessieren6476
    @jessieren6476 3 года назад

    Thank you so much, Sir!

  • @ballpen9157
    @ballpen9157 Год назад

    wow. I like it so much. thank you.

  • @ragadiveluka
    @ragadiveluka 2 года назад

    Great video! Thanks a lot!!

  • @tafsirhaquearnob9511
    @tafsirhaquearnob9511 3 года назад

    why we use "?callable" before a callback function, as a parameter of another function??

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      ? Means nullable so you can pass a callback or null, it's set to null by default

    • @tafsirhaquearnob9511
      @tafsirhaquearnob9511 3 года назад

      @@ProgramWithGio thank you

  • @sandeshb2534
    @sandeshb2534 3 года назад +1

    How many students were able to solve this on their own. I have been following the tutorial, but was unable to get even upto 25% of the solution. And when i went through this video, most of it looks somewhat new to me. After referring the php documentation I was able to understand. Am i dumb or wasn't i following the tutorials properly??

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      No you are not dumb. There are many different ways you could implement this so don't feel discouraged. It's perfectly normal to refer to PHP documentation or Google things, I've been coding for over a decade and I always check docs and google things, you are not expected to remember or know everything. So don't worry about it. If you have specific questions about the solution send me an email or DM on twitter and I can help walk you through it 👍. Also I would rewatch the working with files lesson, that should help with reading files.

    • @kawaneajay
      @kawaneajay 2 года назад

      i also get very hard to understand

    • @Zubbee
      @Zubbee 2 года назад

      Same thing I'm wondering to myself after watching this solution. I'm even reading comments to see if someone else was kinda lost like i was while attempting the exercise and watching the solution. I think my main issue lies with understanding how arrays and functions work together. I need to learn to think like a programmer more. God help me!!!

    • @mayatundeolawale3
      @mayatundeolawale3 2 года назад

      My problem is I think Gio needs to slow down little he is kind of fast as in too fast for me to understand all the concepts 😕😕😕

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 2 года назад

    God!! I learned a lot!!!

  • @elvisjunior2892
    @elvisjunior2892 4 месяца назад

    How did you get so good? Is there any book that helped you master php?