<?php $string = "hello/local/flower/stone/...";$keyword = "local"; echo substr($string, 0, strpos($string, $keyword)); ?>
Standard input is empty
hello/
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!