I am brand new to mysql, I did Oracle in College but I kinda like mysql

I am doing a project for Tech, and I need to know if it is possible to
create a script for mysql back up using php.

One of the criteria for evaluation is, back up.

I know there is mysql_dump(), how to I use this function and are
there other means availble as well