Любой гепатит С вопросы по PHP?
a) With reference to the following: $sch = array( ‘T’ => “SFD”, ‘L’ => “SOT”, ‘H’ => “MASSCOM”, ‘Hy’ => “BBA” ); i. There are two (2) ways in PHP to create an array: INDEX and ASSOCIATIVE. In the $sch array example above, one of the types is used. Rewrite the $sch array using the other type. ii. Write a PHP code to output the content of the $sch array, each one on a separate line, for the one you have written above (b) b) Session variables uses associative array to keep track of users. Write down a simple piece of PHP code using session which test to find out whether the user of current_page.php is logged in or not using session. In your code, if the user is logged in, render the said page else redirect this user to the login.php
Что я уже пробовал:
<?php $sch = array( ‘T’ => “SFD”, ‘L’ => “SOT”, ‘H’ => “MASSCOM”, ‘Hy’ => “BBA” );