Web Design and Programming Pt 4 PHP Arrays

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I very much appreciate that you took the time to tell me that :) I'm very happy that they are helping and you're very welcome!

derekbanas
Автор

Video created 7 years ago. still valid today... much better than paid courses!! Thanks a lot Derek :)

saurabhs
Автор

@prabhjotNZ The . is the concatenation operator in PHP use it for putting 2 strings together. The comma can be used for multiple types

derekbanas
Автор

I use double quotes out of habit because when using single quotes any variables inside aren't evaluated to their value. I heard a long time ago that it was quicker to use commas with echo, so that is why I do that. I know you can't use them with print.

You'll pick up habits over time. I'm glad you liked the video :)

derekbanas
Автор

you should make audio books your voice is just amazing,

RichardMillion
Автор

@powerhousephg Yes you are correct. In tutorials I don't always make everything as efficient as possible. Most of the time I'm doing this stuff out of my head and make little errors like that

derekbanas
Автор

Thank you :) I have weird allergies that make my voice go crazy. I'm glad you like it

derekbanas
Автор

Dziękuję. Jestem szczęśliwy, że pomoże im :)

derekbanas
Автор

Because my english is not so brilliant as yours tutorials I'm gonna write a comment in my language:
Niesamowite tutoriale- szybko, konkretnie i bardzo przejrzyście nawet jak jak na takiego laika w sprawach PHP jak ja.
What in shortcut means AWESOME !!!

tomaszzlosnik
Автор

foreach makes it easy to iterate over arrays, or objects. If you have foreach (your_array as $value) your_array is the array you will be iterating through from start to finish. Each step of the way the current value stored in array is assigned to $value. Does that help?

derekbanas
Автор

@rupamguha Not sure what you mean by exchange keys and values?

derekbanas
Автор

@dreamtownuk I sent your answer in another post. i hope that helps

derekbanas
Автор

@derekbanas Can you explain more please? Can they both not do the same thing? . and, are doing the same thing for me

darkandgreen
Автор

Can you please explain the "as" statement in a bit more detail in the for each loop. Not sure why, but it's confusing me. I just want to know what the code is telling the computer to do when it runs foreach ( $customers as $keys). Thanks!

lupitchr
Автор

Also please explain the use of print_r method

sethu
Автор

You should explain why we would use this and what the functions are pointing to first. It was difficult to follow the list of commands you provided without the foundation of potential use.

thespeakerstaffinformation
Автор

Thanks!

Questions:
in the array, we are using double quotes, array("Name" => "Mike), in the $_POST['We use single'], So, why cant we use single quotes in arrays? or why cant we use double in $_POST, I'm very confused on when to use double or single

Question 2

You are sometimes using
echo $Var1, " ", $var2;

other times you are using
echo $var1 . " " . $var2;
they both do the same thing? as the results are identical
When do we use each?

Thanks 100 times

darkandgreen
Автор

What font do you use in your coding program?

DerekLyonsYep
Автор

is it possible to just call on the value of the $myinfo?
usually i do is
$example = array("ex1", "ex2", )
echo $example[1];

OUTPUT:
ex2

but since you put a value on the key, is it possible to just print the value in it?

bobcabatbat
Автор

Hey, I would love to see how to make a website with a database (for example to make a webshop or intranet for companies) and how to use CMS so people can edit their own text-content without changing my design.

DuskAngel