PHP - foreach Loops and Associative Arrays

  Рет қаралды 18,897

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

Пікірлер: 20
@dayoungkim1484
@dayoungkim1484 4 жыл бұрын
Thank you for making this vedio. Your voice is so smooth!
@shahrukhfaruki1876
@shahrukhfaruki1876 4 жыл бұрын
Superb Sir, I just have clear my doubts, Now seeking foreach() for 2D arrays. Taking Fight_Club Values was Awesome!!
@thomasaldar1116
@thomasaldar1116 2 жыл бұрын
just wow, associative array and foreach always confuses me, thank u learned soo much
@Venezuelangel
@Venezuelangel 4 жыл бұрын
Steve Rogers= "I understood that (fight club) reference!"
@adrianoprovenzano3778
@adrianoprovenzano3778 5 жыл бұрын
Thanks, was really clear. Nice video!
@invsg5072
@invsg5072 3 жыл бұрын
Useful video
@ikhsanhaikal3833
@ikhsanhaikal3833 4 жыл бұрын
Awesome tutorial, will you also cover pdo insert, update and viewing data in the future?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
I have the PDO connection tutorial in my PHP playlist - kzbin.info/www/bejne/rX7QY5-LpLKYbM0 And I have a whole MySQL playlist - kzbin.info/www/bejne/l2q6aIKmiJl_nKs Eventually I will get back to the PHP list and add more PDO stuff but can't say when.
@ikhsanhaikal3833
@ikhsanhaikal3833 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 can't wait for more pdo stuff
@hibahasan9627
@hibahasan9627 3 жыл бұрын
thank youuuu
@Samuel-vk6kl
@Samuel-vk6kl 5 жыл бұрын
thanks nice tutorial
@cappuccinotiramisu2594
@cappuccinotiramisu2594 4 жыл бұрын
ty!!
@chome4
@chome4 4 жыл бұрын
How do you get to apply 'foreach' to make all names printed in a different colour. I have a phpmailer array with several error messages but my page is dark and they default to black.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
That is a CSS issue not a PHP one. In a webpage or email the colour is controlled by CSS
@chome4
@chome4 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Hey Steve, I've managed to apply css to the 'echo' command in another php document successfully but that wasn't an array. If I try to add tags and use style="", the page implodes! I'll mess around with this some more. PHP is pretty unforgiving! Thanks for your quick response...
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
@@chome4 Don't use inline style properties in your HTML. stick to using CSS class names. Modifying my example from the video: foreach($assoc as $key => $name){ echo '' . $name . ''; } You just have to make sure your quotation marks are properly matched.
@chome4
@chome4 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 OK thanks. Echo commands now given classes.
@mnunez6153
@mnunez6153 3 жыл бұрын
sir, how can i store an array of data (into a new table in the DB) from the result of a query? I already have this: $result=mysqli_query($con,$query); It displays the correct rows of information. But I want to store thar new information into a new table in the DB. How to do it? I used while loop (because i just couldnt figure out how to do using foreach loop) but only 1 row is inserted into the table. I wonder why. Here's my while loop: while($row=mysqli_fetch_assoc($result){...$query= "INSERT INTO...} . It insert only 1 row. Further to it, the DB duplicates everytime i refresh the browser. Im stuck....
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
The while loop can be used to do this as long as you are not closing the connection. Are you using a transaction? Are you committing the transaction? Have you considered using a VIEW or a Stored Procedure to copy the data?
PHP - include and require
10:34
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 1,2 М.
PHP - TRICKS WITH FOR LOOPS
11:10
PHPBasics
Рет қаралды 51 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 34 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 58 МЛН
PHP associative arrays explained
11:21
Bro Code
Рет қаралды 7 М.
Deep Dive into Array from method
22:05
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 2,8 М.
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,8 МЛН
PHP Foreach Loop Tutorial
6:16
Clever Techie
Рет қаралды 104 М.
PHP Tutorial (& MySQL) #8 - Multidimensional Arrays
10:07
Net Ninja
Рет қаралды 98 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 619 М.
Associative Arrays | PHP | Tutorial 17
7:53
Giraffe Academy
Рет қаралды 9 М.