$hostname = "abc.domain.com"
I just want "abc" and nothing after it.
收起
Use explode():
explode()
$parts = explode('.', $hostname); // $parts[0]
报告相同问题?