how to fix this broken sprinkler pipe
1. Is that the last head? Can't tell in the photo.
2. I supposed you have not glued pvc pipe before? Just asking.
3. Do you have an established plumbing supply store nearby? Not Xmart.
4. Do you mind spending a few dollars for tools to use later?
This is one of those things that is simple to repair and buying a few supplies and tools is still cheaper than paying someone.
Remove the nozzle from the socket. Or, take the whole thing with you to a plumbing supply house and they can show you how and sell you what you need.
You will need:
Something to cut the pipe with, cleaner, solvent, new elbow (ell).
You need to cut the broken end of the pipe off even. Use a hacksaw blade or pvc pipe cutter. Clean the cut end of burrs, etc. Use a pocketknife, sandpaper, etc. Use cleaner, then solvent on both pieces. Most of the solvent (glue) should go on the pipe, just a little on the inside edge of the elbow. At this point you only have a few seconds to work so have everything ready before you start. Push the pieces together, twist 1/4 turn, and hold for 10-20 seconds. I like to dry fit them together and make a reference mark on both pieces with a pencil or sharpie for the point where they should be at completion. Start with the pieces about 1/4 turn from where they should end then push and twist until both marks are re-aligned. I find it easier to look at two marks side by side than trying to look at the fitting to see if it is straight up when you only have a couple of seconds.
Cleaner and solvent should be about $3 each, pvc cutter about $10 or cheap hacksaw for $5, elbow $0.69.
If it's worth doing, it's worth doing right. If you wouldn't put your name on it, it ain't done right!