A current (moving charges) is produced in the wire which in turn produces a magnetic field.
(A current (moving charges; is produced; L:in the wire) (the wire; produces; a magnetic field)
A current (moving charges the wire
is produced produces
L:in the wire
a magnetic field