Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Dennis Castillo
Dennis Castillo
16,018 Points

Putting the dots to specific x and y coordinates in php.

Hello guys,

I have a problem about how I'm going to put the Dots to a specific x and y coordinates in php. But i dont know what to use, so many sample out there but to much for me i need a simple code to understand to get me a heads-up. It's just like this...

<?php
$x = 200; 
$y =  400;
$typhoon = "<div class='dots'></div>";

echo $typhoon($x, $y);
?>

I know this is wrong but should give you an idea, I've done this in Java but i don't know how to implement and what tools or something should I use in PHP. I'm making a personal project tracking a tropical cyclone according to it's latitude and longitude coordinates.

Thank you :)

1 Answer

Hmm may be the code like this

<?php
$x = 200;
$y = 400;

function typhoon($x,$y){
echo $x ."<div class='dots'></div>".$y;

}
echo typhoon($x,$y);

May be something kind of that ?

but your project idea is nice . Hope you successful with it soon :D

Thanks