Jump to content

PHP Code Help!


kamal213

Recommended Posts

Hi guys,

 

Can you tell me if it is possible. Let say you had a table which stores names and address (with a primary key and auto-increment) , and a PHP script which display every thing on you SQL Table dynamically.

 

Is it possible to write a PHP code such that if a name and address is added it display and its clickable "i.e. <a href="">$name,$address</a>", and if a new name and address is added its also clickable BUT the older/previous added become unclickable.

 

I would really appreciate your inputs

 

Thanks guys!

Link to comment
https://forums.phpfreaks.com/topic/242422-php-code-help/
Share on other sites

$testArray = range(1,20);

That is a range, it saved me from doing this....(but now I see I'm doing it anyway)

same as

$testArray = array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20");

 

foreach will loop each value within the array

http://php.net/manual/en/control-structures.foreach.php

 

Arrays start at key position zero $value[0]

 

All i did is replace the first key value with something else

Link to comment
https://forums.phpfreaks.com/topic/242422-php-code-help/#findComment-1245115
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.