Lo/La vs A él/A ella
I was wondering whether gramatically, the two things are interchangeable in Spanish, or whether one carries a slightly different meaning to the other?
Also, does anyone know what the rule is about why some sentences start with A él/A Dani etcetera. I'm presuming it's something to do with the fact that there's a direct named subject afterwards, but I can't work out why it is used in some sentences and not others.
"lo/la" are direct objects; "a él/a ella" introduce indirect objects (le). So no, they aren't interchangeable.
I think you're probably talking about sentences like "A Dani le gusta la música", right? (Dani likes music).
In the Spanish sentence, "Dani" is not the subject of the sentence but rather the indirect object. A more literal translation of the Spanish sentence would be "Music is pleasing to Dani". That's why you need to say "A Dani le gusta" and not just "Dani le gusta" - without the 'a', the sentence is formatted like Dani is the subject, which he isn't.
Further, the "lo/la"are direct object pronouns. If a sentence has a direct object pronoun, it must be used. The "a él/a ella" would be the actual direct object, or it could be a name "a Dani", or it could be a thing. In any case, it is what the direct object pronoun refers to. It is optional in the sentence. You would use it to either clarify what the pronoun refers to or for emphasis. So "Marco la besó a Dani" could be "Marco la besó a ella" or simply "Marco la besó" if we already knew who he kissed.