# Basic operation of BJT (Bipolar Junction Transistor) [duplicate]

I've searched many references, but now I'm stuck. What I understand so far is that a transistor is made up from two diodes, and as far as I know, the function of diode is only allow a current flow from one direction (ideal diode).

I've looked at this diagram of transistors:

For PNP transistor: If I trigger the Base with some small current, Ib, how can the current from the Collector flow to the Emitter, if there's a diode there (in the Emitter)?

Same question with NPN transistor.

I'm stuck here....