Jump to content

wohlm

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by wohlm

  1. Here is my array $prices = array('Sweaters'=>100, 'Shoes'=>10, 'Watches'=>4); reset($prices); while (list($product, $price) = each($prices)) { echo "$product - $price<br />"; } Here is what I don't understand. I am setting $product variable and $price variable to the prices array under "each." How does $product and $price read from the array. I realize it's being reset here, but how does it make that connection?
  2. I'm going through this book and I've came across this operator '|' What purpose does it serve? This is the example I was given echo '|'.$products[0][0].'|'.$products[0][1].'|'.$products[0][2].'|<br />'; It's printing the products array by key and value, but I don't know what that operator is.
  3. I'm in the same boat as you. I've been going through this book on php. I'm familiar with the syntax of php, using flat files and commands such as fopen()..now I'm going through arrays. Best thing you can do is ask questions and be persistent with learning.
  4. Hello guys, I've been coming across php projects lately and I am trying my best to learn the language. I figured the best way I would learn is by being on here to figure out problems that I would come across. and boom goes the dynamite!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.