because we are on the internet.

Archives for March, 2009

Hello,recently,I am learning fireworks to make different kinds of image,above is one image made by myself,please put your comments,and if you have any other ways to make nice looking images,please feel free to share your information here.use fireworks to make different kinds of images.

If possible I will post the way to reach image like above in my next post.

 Foreach (array_expression as $value){

statement;

}

Foreach (array_expression as $key => $value){

statement;

}

for example

<?php

$arr = array(2,3,4,5) ;

foreach($arr as &$value){

$value = $value * 2;

}

//$arr now is array(4,6,8,10)

unset($value);//break the reference with the last element

//warning Reference of a $value and the last array element remain even after the foreach loop.It is recommended to destroy it by unset().

?>

<?php

$arr = array(”apply “,”orange”,”banana”);

reset($arr); //Set the internal pointer of an array to its first element

foreach($arr as $key => $value){

echo “Key:$key;Value:$value<br />\n”;

}

?>

In case you have lots of articles need to be show within the homepage,however,if we show all the links within homepage,that will make the homepage really ugly,how can we keep the links while make our site good looking.

We can use this script as follows:

<script language=JavaScript>

<! –

function MAP(s)

{var d = s.options[s.selectedIndex].value;

open(d,”open”);

s.selectedIndex=0 ;

}

//–>

</script>

<form name=milHomeLink>

<select onchange=”MAP(this);” size=”1″ selze=”1″ name=”select2″>

<option>Please choose your article</option>

<option value=”http://www.yoururlone.com”>yourtitleone</option>

<option value=”http://www.yoururltwo.com”>yourtitletwo</option>

<option value=”http://www.yoururlonethree.com”>yourtitlethree</option>

<option value=”http://www.yoururlonefour.com”>yourtitlefour</option>

<option value=”http://www.yoururlonefive.com”>yourtitlefive</option>

</select>

</form>
Quite easy right,in fact,it is very useful.

Hope this can help you to get save space for you pages.

 

About Author

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum at arcu. Integer et risus. Morbi id tellus. Integer felis. Mauris malesuada, turpis vitae facilisis euismod, dui arcu adipiscing sem, eu vulputate leo ante in lacus. Sed porta accumsan lectus. Aenean ac sem. In consequat tempus velit. Phasellus leo enim, adipiscing a, egestas nec, pretium ut, pede. Mauris sollicitudin diam et mauris. Sed quis enim vel augue egestas lobortis. Etiam tempus ipsum vel neque.