Functions and classes remote 'fiddlyness' from your code and make it more readable - and believe me, when you're working on something substantial readability is important.
For example, I never use the build in mysql commands any more, with their result handles and connection handles - too much mess. I've written a class that handles all that internally so
$query = "SELECT SOMETHING....";
$res = mysql_query($query, $dbHandle);
If (!$res)
{
echo 'MYSQL FAILURE On query: ', $query, '<br />', mysql_error();
exit;
}
while ($row = mysql_fetch_assoc($res))
{
// your stuff
}
Becomes
$q = "SELECT SOMETHING...";
$db->safe_query($q);
while ($row = $db->fetch_assoc())
{
// your stuff
}
Objects are great for encapsulation. When I was videogame programming I had to do stuff with missiles following paths leaving flame trails that were animations (each starting at different stages) - when a missile hit something (it would check itself as every object in the game has an action() function that was different for each type of object) then it would kill itself and create 100 or so particle effect objects and a central explosion... each of those resposible for their trajectory and lifetime.
Doing that without objects would be an absolute nightmare.