Trying to use iFrame in php

I am a beginner looking for some help using an iframe within some php code:

The following code calls an image and a link from a MySQL databse:

<a href="<?php echo $SchoolsLink ?>"><img src="/images/<?php echo $School -> SchoolsImage ?>" alt="<?php echo $Title ?>" /></a>

What I want to happen is: When the visitor clicks on the link generated by <?php echo $SchoolsLink ?> I want the next page to open in an iframe… Can anyone help me figure this out?

Thanks

just add target=“iFrameName” to the anchor

Thanks for replying… What do you mean by “iFrameName”? I was hoping to just use the html <iframe> tags… is there a different way I should do it?

Most html tags have the name attribute. Give your iframe one, replce my iFrameName with the name you choose.

Ok, I understand that part, but I still have a question (stupid one I am sure):

I am not sure where to open and close the iframe in that code? I see now that I need to name the iframe, and then put that name in the link target, but where do I open and close the frame around the php?

You put it where ever you want it so show up on the page…

Yes, but I only want it to show up when someone clicks the link… I want it to replace all the content currently showing when they click it…

i want to use iframe within javascript or using javascript.

my code is like —
<script type=“text/javascript”>
var Tree = new Array;
Tree[0] = “1|0|Mobile|#”;
Tree[1] = "2|1| <?php echo $array[0];?> | iphone.php ";
Tree[2] = “3|1|<?php echo $array[1];?>| blackberry.php”;
Tree[3] = “”;
Tree[4] = “5|1|<?php echo $array[2];?>| android.php”;
Tree[5] = “”;
Tree[6] = “”;
Tree[7] = “”;
Tree[8] = "9|1|<?php echo $array[3];?>| " ;
</script>
i want when some one click on iphone.php or blackberry.php ,it will open on the same page in a iframe…
pls help me…i am a beginer…