I got my problem solved for php7.2 but not sure about php7.3.
we can still install php7.2 by terminal "apt install php7.2".
But we have to install php7.4 too otherwise it will remove main php package. It may need some research, but shortly okay I will go with my instructions(for php7.2):
(sudo add-apt-repository ppa:ondrej/php) wont be necessary, it can be removed
1) install by php7.2 "apt install php7.2"
2) goto to this link and download .deb file https://packages.ubuntu.com/bionic/amd64/libapache2-mod-php7.2/download
(dont install it yet, we have to place it manually in system)
3) extract the libapache2, there will be "data" archieve in it. It has two folder etc and usr. Copy those folder to matching directory of the root.
4) now to choose php7.2 rather than php7.4,because php7.4 is default( enter these commands )
5) although php -v shows version 7.4(because latest), it still uses php7.2
6) to switch from php7.4 to php7.2 older version:
sudo update-alternatives --set php /usr/bin/php7.2
7) now php -v shows version 7.2 as default
It should now work as php7.2