mb_stristr

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

mb_stristrFinds first occurrence of a string within another, case insensitive

Beschreibung

mb_stristr(
    string $haystack,
    string $needle,
    bool $before_needle = false,
    ?string $encoding = null
): string|false

mb_stristr() finds the first occurrence of needle in haystack and returns the portion of haystack. Unlike mb_strstr(), mb_stristr() is case-insensitive. If needle is not found, it returns false.

Parameter-Liste

haystack

The string from which to get the first occurrence of needle

needle

The string to find in haystack

before_needle

Determines which portion of haystack this function returns. If set to true, it returns all of haystack from the beginning to the first occurrence of needle (excluding needle). If set to false, it returns all of haystack from the first occurrence of needle to the end (including needle).

encoding

Character encoding name to use. If it is omitted, internal character encoding is used.

Rückgabewerte

Returns the portion of haystack, or false if needle is not found.

Changelog

Version Beschreibung
8.0.0 needle akzeptiert nun eine leere Zeichenkette.
8.0.0 encoding ist nun nullable (akzeptiert den null-Wert).

Siehe auch

  • stristr() - Wie strstr, aber unabhängig von Groß- bzw. Kleinschreibung
  • strstr() - Findet das erste Vorkommen eines Strings
  • mb_strstr() - Finds first occurrence of a string within another

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Definition von Stored Procedures - eine Einführung

Stored Procedures sind vordefinierte SQL-Codeblöcke, die in einer Datenbank gespeichert sind und bei Bedarf aufgerufen werden können. ...

Bernie

Autor : ebiz-consult GmbH & Co. KG
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Arbeitszeitplan - KW und Datum werden falsch angezeigt

It looks like your problem may be related to how the current PHP code handles days and weeks. To fix, you can try updating your code as follows: l ...

Geschrieben von miajackson1117 am 16.05.2024 05:26:57
Forum: PHP Developer Forum
[Mini Vorstellung] AnoMarket

AnoMarket - Deine Anonym Markplace für Weed & legal/grauzone Service/Ware Was ist AnoMarket? Eine Anonym Markplace für Weed/Cannabis & legal/gr ...

Geschrieben von Anom am 16.05.2024 00:53:13
Forum: User pages
Spielplan für 4 Gruppen zu je 6 Teams auf 2 Feldern

Hey, hallöchen! Du musst die Spiele so durchgehen, dass die Platzierung kontrolliert wechseln, dass jedes Team auf den Plätzen spielt. Hier ist ...

Geschrieben von Nico_Schubert am 14.05.2024 07:17:28
Forum: PHP Developer Forum
Bild drehen

Hallo, Du hast den Drehwinkel und den Pfad zum Bild bereits richtig im Post-Array. Hier ist ein vollständiges Beispiel, wie du das Bild drehst u ...

Geschrieben von Nico_Schubert am 14.05.2024 06:55:15
Forum: PHP Developer Forum