faces3 Posted April 18, 2013 Share Posted April 18, 2013 File1: <?php $home['1']='home/1.php' $home['2']='home/2.php' ?> File2: <?php Include File1.php <a href="<?php echo $home['1']; ?>">home 1</a> ?> Whats wrong is that simple script? Can someone help me little bit Quote Link to comment Share on other sites More sharing options...
Solution computermax2328 Posted April 18, 2013 Solution Share Posted April 18, 2013 (edited) Well to start off, idk if you just forgot to paste them in but in file1.php home/1.php and home/2.php dont have semicolons at the end. It should be... <?php $home['1']='home/1.php'; $home['2']='home/2.php'; ?> Second, not really sure why you have a / between "home" and 1. Just name the file home1.php. Also, just name your variables $home1 and $home2. Correct me someone if I am wrong, but I am pretty sure the 1 and 2 are only used after a variable to identify them in a common array. Correction: multidimensional array, not common array Edited April 18, 2013 by computermax2328 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.